I have saved some url's in a text(link.txt) file & some proxy(proxy.txt) in another text file.
now i want to use different proxy for each url.
like:
this is my code but i don't know how to use different proxy(proxy.txt) for each url.
please tell me how to make this work.
try
{
foreach (string sr in File.ReadAllLines("link.txt"))
{
webBrowser1.Navigate(sr);
}
webBrowser1.ScriptErrorsSuppressed = true;
while (webBrowser1.ReadyState != WebBrowserReadyState.Complete)
{
Application.DoEvents();
}
}
catch(Exception)
{
MessageBox.Show("Internet Connection not found","Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
this.Close();
}
try this:
Public Sub SetProxy(ByVal ServerName As String, ByVal port As Integer)
Try
Dim regkey1 As RegistryKey
regkey1 = Registry.CurrentUser.CreateSubKey("Software\Microsoft\Windows\CurrentVersion\Internet Settings", True)
regkey1.SetValue("ProxyServer", ServerName + ":" + port.ToString(), RegistryValueKind.Unknown)
regkey1.SetValue("ProxyEnable", True, RegistryValueKind.DWord)
regkey1.Close()
Catch ex As Exception
End Try
End Sub
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.