Proxy Server setzen

Legt den Proxyserver (SOCKS-4) 127.0.0.1:6666 für die Verbindung Nettalk fest.

#NewScriptBegin SetProxyServer
 
Sub Serv_Connect(ConnID)
  If GetVal(ConnID,4) = "Nettalk" Then
    SetProxy "127.0.0.1", 6666, ConnID
  End if
End Sub

Für das SOCKS-4a-Protokoll muss die SOCKS-Version mit übergeben werden, möglich ist „4“ für SOCKS-4 und „4.5“ für SOCKS-4a:

#NewScriptBegin SetProxyServer
 
Sub Serv_Connect(ConnID)
  If GetVal(ConnID,4) = "Nettalk" Then
    SetProxy "127.0.0.1", 6666, ConnID, 4.5
  End if
End Sub

Mit externer Proxyliste:

#NewScriptBegin ProxyServerList
 
Dim ProxyIndex
 
Sub Load()
  ProxyIndex = 0
End Sub
 
Sub Serv_Connect(ConnID)
  If GetVal(ConnID,4) = "Nettalk" Then
    SetNextProxy ConnID
  End if
End Sub
 
Sub SetNextProxy(ConnID)
  ProxyIndex = ProxyIndex + 1
 
  tmp = Split(ReadFile("C:\ProxyIpList.txt"), ProxyIndex, Chr(13)+Chr(10))
 
  if Len(tmp) = 0 Then
    ProxyIndex = 1
    tmp = Split(ReadFile("C:\ProxyIpList.txt"), ProxyIndex, Chr(13)+Chr(10))
  end if
 
  ProxyServer = Split(tmp, 1, ":")
  ProxyPort = Split(tmp, 2, ":")
 
  SetProxy ProxyServer, ProxyPort, ConnID
End Sub

Eigene Werkzeuge