Autor Beitrag
Highspeeder
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 34

Win 7
Delphi 7 Profesional,Visual Basic
BeitragVerfasst: Mi 12.07.06 21:26 
Hallo !
Bei jedem Browser kann man einen Proxyserver einstellen.
Wenn da nun im Browser ein Proxy eingestellt ist, verwenden den die Delphikomponenten dann auch ?
Oder kann ich das bei den Komponenten irgendwo einstellen ?

2. Wie wechsle ich programmgesteuert einen Proxy ?

Danke
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Mi 12.07.06 21:32 
Nein, die verwenden den nicht automatisch. Welche Kompos meinst du mit die Delphi-Komponenten? (indys?)

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
Highspeeder Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 34

Win 7
Delphi 7 Profesional,Visual Basic
BeitragVerfasst: Mi 12.07.06 22:01 
na ja..eigentlich alle Komponenten, auch Indy.
Auch den MS-Webbroser oder UrlDownloadToFile
root_at_localhost
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 191



BeitragVerfasst: Mi 12.07.06 23:17 
Die Indys nein, beim MS-Webbrowser denk ich mal ja, die dritte kenn ich nicht. Du kannst aber für die Indys die Proxyeinstellungen vom IE aus der Registry auslesen und bei der Kompo eintragen.
Highspeeder Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 34

Win 7
Delphi 7 Profesional,Visual Basic
BeitragVerfasst: Do 13.07.06 01:26 
Zeig mir da mal bitte ein konkretes Codebeispiel wie das geht !
root_at_localhost
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 191



BeitragVerfasst: Do 13.07.06 14:52 
Hab da grad kein Beispiel zur Hand, aber wo ist das Problem? Die Proxyeinstellungen sind gespeichert unter
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
dort primär die Schlüssel ProxyEnable und ProxyServer.
Die kannt du mit ner TRegistry-Komponente auslesen. Wie man bei in Indy-Komponenten einen Proxy einstellt sollte in der Indy-Dokumentation stehen, oder?
Wenn du trotzdem noch irgendwo Probleme hast melde dich...
Pierre
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 138

Win 98se und XP prof
D5Pers und D7Prof
BeitragVerfasst: Sa 15.07.06 11:57 
Hallo,
hier Code von mir.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
  memo1.Lines.Add ('nehme Proxy-Einstellungen vor ...');
  // vor dem Connect
  if P_typ = '1' then idFTP1.ProxySettings.ProxyType:=(fpcmUserSite);
  if P_typ = '2' then idFTP1.ProxySettings.ProxyType:=(fpcmSite);
  if P_typ = '3' then idFTP1.ProxySettings.ProxyType:=(fpcmOpen);
  if P_typ = '4' then idFTP1.ProxySettings.ProxyType:=(fpcmUserPass);
  if P_typ = '5' then idFTP1.ProxySettings.ProxyType:=(fpcmTransparent);
  if P_IP <> '' then  idFTP1.ProxySettings.Host:=P_ip;
  if P_Port <>'' then idFTP1.ProxySettings.Port:=strtoint(P_port);
  if P_Benutzer <> '' then idFTP1.ProxySettings.UserName:=P_Benutzer;
  if P_Kennwort <> '' then idFTP1.ProxySettings.Password:=P_Kennwort;
  if P_Aktiv = 'a' then idFTP1.Passive:=false;
  if P_Aktiv = 'b' then  idFTP1.Passive:=true;
   
  // nach dem Connect und vor der Übertragung!
  if checkbox2.checked then idFTP1.Transfertype(ftBinary) else idFTP1.Transfertype:=(ftASCII);


Ich hoffe, es hilft.
Gruß Pierre

Moderiert von user profile iconraziel: Code- durch Delphi-Tags ersetzt