Multiprocessing Share Unserializable Objects Between Processes

Most of the time it’s not really desirable to pass the reference of an existing object to another process. Instead you create your class you want to share between processes: class MySharedClass: # stuff… Then you make a proxy manager like this: import multiprocessing.managers as m class MyManager(m.BaseManager): pass # Pass is really enough. Nothing … Read more

Web site exhibits JavaScript error on iPad / iPhone under 3G but not under WiFi

I’ve investigated this further and discovered that the problem is that the UK mobile operator O2 (the original exclusive iPhone operator for Apple), modifies web content before sending it to iPhones and iPads. Probably before sending it to any device running a mobile browser. They non-deterministically inline some of the CSS and JavaScript into the … Read more

How do I find out the browser’s proxy settings?

The function you’re looking for is WinHttpGetIEProxyConfigForCurrentUser(), which is documented at http://msdn.microsoft.com/en-us/library/aa384096(VS.85).aspx. This function is used by Firefox and Opera to get their proxy settings by default, although you can override them per-browser. Don’t do that, though. The right thing to do (which is what everybody else does) is to just get the IE settings … Read more

How can I use an HTTP proxy for a JAX-WS request without setting a system-wide property?

I recommend using a custom ProxySelector. I had the same problem and it works great and is super flexible. It’s simple too. Here’s my CustomProxySelector: import org.hibernate.validator.util.LoggerFactory; import org.springframework.beans.factory.annotation.Value; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.*; import java.util.ArrayList; import java.util.List; import java.util.logging.Logger; /** * So the way a ProxySelector works is that … Read more

Webdriver and proxy server for firefox

Value for network.proxy.http_port should be integer (no quotes should be used) and network.proxy.type should be set as 1 (ProxyType.MANUAL, Manual proxy settings) FirefoxProfile profile = new FirefoxProfile(); profile.setPreference(“network.proxy.type”, 1); profile.setPreference(“network.proxy.http”, “localhost”); profile.setPreference(“network.proxy.http_port”, 3128); WebDriver driver = new FirefoxDriver(profile);

Dynamic proxy_pass to $var with nginx 1.0

I’ve recently stumbled upon this need myself and have found that in order to use variables in a proxy_pass destination you need to set a resolver as your error.log would most probably contain something like no resolver defined to resolve … The solution in my case was to setup the following using a local DNS … Read more

Assigning vhosts to Docker ports

This answer might be a bit late, but what you need is an automatic reverse proxy. I have used two solutions for that: jwilder/nginx-proxy Traefik With time, my preference is to use Traefik. Mostly because it is well documented and maintained, and comes with more features (load balancing with different strategies and priorities, healthchecks, circuit … Read more