First start the server proxy on your server machine and forward traffic to a server
such as google.com.
$ marionette server -format http_simple_blocking -proxy google.com:80
listening on [::]:8081, proxying to google.com:80
This has launched the server process. The server is now waiting for a client connection.
Leave the server process running and start the client proxy on your client machine and connect to your server proxy.
Replace $SERVER_IP with the IP address of your server.
$ marionette client -format http_simple_blocking -server $SERVER_IP
listening on 127.0.0.1:8079, connected to <SERVER_IP>
Now the client process has started and is waiting for traffic at 127.0.0.1:8079 to forward to the server.
Finally, send a curl to 127.0.0.1:8079 and you should see a response from
google.com:
$ curl 127.0.0.1:8079
Testing Marionette is best done through the Firefox browser. If you do not have a copy of Firefox, download it here.
Go to:
Firefox > Preferences > General > Network Proxy
Although the code can work through the proxy with the above data, Firefox does not yet have its DNS fully going through the proxy. To fix this:
First start the server proxy on your server machine and forward traffic to a server
such as google.com.
$ marionette server -format http_simple_blocking -socks5
listening on [::]:8081, proxying via socks5
Note that, unlike before, we do not use a -proxy command line option, but instead use -socks5 option. This starts a general socks5 proxy server that internet connections can pass through.
This has launched the server process. The server is now waiting for a client connection.
Leave the server process running and start the client proxy on your client machine and connect to your server proxy.
Replace $SERVER_IP with the IP address of your server.
$ marionette client -format http_simple_blocking -server $SERVER_IP
listening on 127.0.0.1:8079, connected to <SERVER_IP>
Now the client process has started and is waiting for traffic at 127.0.0.1:8079 to forward to the server.
Now start the Firefox browser as earlier configured. You will now be able to surf the web.