Giter Club home page Giter Club logo

docker-forgetproxy's Introduction

docker-forgetproxy

A transparent socks proxy for Docker.

If you are running Docker behind a corporate http proxy, you probably know how annoying it is having to configure the proxy in every container.

You can run this container instead to just forget it and let docker run as if you had a direct connection to the outside world.

This container is based on the munkyboy / redsocks one. It runs entirely from inside the container.

Disclaimer

/!\ BEWARE! THIS CONTAINER MODIFIES THE IPTABLES RULES FOR THE docker0 INTERFACE ON THE HOST MACHINE!!! PLEASE READ THE EXPLANATIONS BELOW AND MAKE SURE TO EXIT IT CLEANLY OR TO RUN THE STOP COMMAND TO RESET YOUR RULES

How it works

All network connections coming out of the docker0 interface will automatically be proxified.

The container interprets the environment variables http_proxy and https_proxy to configure the socks proxy.

How to use it

start

docker run -ti --net=host --privileged -e http_proxy=http://myproxy:3128 -e https_proxy=http://myproxy:3128 klabs/forgetproxy

It is recommended to let the container run in the foreground as it is configured to intercept the CTRL+C and clean the iptables rules on exit.

stop

If you have your container running, just press CTRL+C. If you need to manually clean the iptables rules that are set by the container, you can run the following command until you get an error telling you the rules do no exist.

docker run --net=host --privileged klabs/forgetproxy stop

docker-forgetproxy's People

Contributors

benoitvidis avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.