How to set proxy for wget?

For all users of the system via the /etc/wgetrc or for the user only with the ~/.wgetrc file: use_proxy=yes http_proxy=127.0.0.1:8080 https_proxy=127.0.0.1:8080 or via -e options placed after the URL: wget … -e use_proxy=yes -e http_proxy=127.0.0.1:8080 …

Detecting whether a user is behind a proxy

TOR does not supply any server headers such as X_FORWARDED_FOR, so your best bet is to use a list of all known exit nodes. A list can be found at https://torstat.xenobite.eu/. For other proxies, you can look at server headers. Possible server headers of interest include: HTTP_VIA HTTP_X_FORWARDED_FOR HTTP_FORWARDED_FOR HTTP_X_FORWARDED HTTP_FORWARDED HTTP_CLIENT_IP HTTP_FORWARDED_FOR_IP VIA X_FORWARDED_FOR … Read more

How users/developers can set the Android’s proxy configuration for versions 2.x?

I don’t think there was any platform-level support for Wi-Fi proxies before Gingerbread or prerhaps Honeycomb. Edit: An Android engineer who works on this part of the platform confirms that the system didn’t have proxies for different network types (e.g., Wi-Fi) until Honeycomb. So there is no “official” way to get the Wi-Fi proxy for … Read more

How to programmatically add a proxy to an NSURLSession

It turns out, the dictionary keys you want are the Stream variants, they are the ones that resolve down to “HTTPProxy” and such: NSString* proxyHost = @”myProxyHost.com”; NSNumber* proxyPort = [NSNumber numberWithInt: 12345]; // Create an NSURLSessionConfiguration that uses the proxy NSDictionary *proxyDict = @{ @”HTTPEnable” : [NSNumber numberWithInt:1], (NSString *)kCFStreamPropertyHTTPProxyHost : proxyHost, (NSString *)kCFStreamPropertyHTTPProxyPort … Read more

C# WebBrowser Control Proxy

private Uri currentUri; private void Form1_Load(object sender, EventArgs e) { currentUri = new Uri(@”http://www.stackoverflow.com”); HttpWebRequest myRequest = (HttpWebRequest) HttpWebRequest.Create(“http://www.stackoverflow.com”); //WebProxy myProxy = new WebProxy(“208.52.92.160:80”); //myRequest.Proxy = myProxy; HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse(); webBrowser1.DocumentStream = myResponse.GetResponseStream(); webBrowser1.Navigating += new WebBrowserNavigatingEventHandler(webBrowser1_Navigating); } void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e) { if (e.Url.AbsolutePath != “blank”) { currentUri = new Uri(currentUri, e.Url.AbsolutePath); … Read more

Setting a proxy for Chrome Driver in Selenium

I’m using the nuget packages for Selenium 2.50.1 with this: ChromeOptions options = new ChromeOptions(); proxy = new Proxy(); proxy.Kind = ProxyKind.Manual; proxy.IsAutoDetect = false; proxy.HttpProxy = proxy.SslProxy = “127.0.0.1:3330”; options.Proxy = proxy; options.AddArgument(“ignore-certificate-errors”); var chromedriver = new ChromeDriver(options);