Skip to content

Opening and forwarding specific ports per docker container is ok for a few containers, the more ports you open the more it becomes a hasstle and totally not clear which ports map to which container. A simple but very effective solution is to use a socks5 proxy. In this episode I will show how to install and use a socks5 proxy and what benefits i…

License

Notifications You must be signed in to change notification settings

marcelmaatkamp/practical-docker-episode-01-socks5-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is the source code repository for https://www.practical-docker.com

episode 01: socks5-proxy vs. port forwarding

https://github.com/marcelmaatkamp/practical-docker-episode-01-socks5-proxy

Opening and forwarding specific ports per docker container is ok for a few containers, the more ports you open the more it becomes a hasstle and totally not clear which ports map to which container.

A simple but very effective solution is to use a socks5 proxy. In this episode I will show how to install and use a socks5 proxy and what benefits it brings to use this solution which is that each container can be reached by its internal hostname which is the name of the container.

Docker containers used:

Installation

$ git clone &&\ 
  cd  &&\
  docker-compose up -d

Usage

Install a proxy switcher in your favorite browser (see below) and goto http://gitlab/

Firefox

Chrome/Chromium

Mac/Safari

!(images/practical-docker-gitlab.png)

Authentication

The socks5 proxy container also comes with username/password authentication.

setting value
Protocol Socks-proxy
Socks Protocol-server localhost
Socks Protocol-port 1080
username someuser
password somepass

Google Chrome/Chromium

Beware: this is not available with Firefox and Google Chrome/Chromium because 'passwords are not transferred over a secure channel', see https://bugs.chromium.org/p/chromium/issues/detail?id=256785

Firefox

Install the addon 'FoxProxy' https://addons.mozilla.org/en-US/firefox/addon/foxyproxy-standard/

firefox: foxproxy

And open http://gitlab/ firefox: gitlab

Mac/Safari

On a Mac Safari open "Network Settings -> Proxies" and enable the Socks-proxy:

safari: authentication

Open Safari and goto http://gitlab/ safari: gitlab

About

In these talks I will give practical tips and tricks on how to effectively use Docker as a valuable tool to solve various problems or just use it for fun projects with all kinds of hardware and software! See my YouTube Channel with all episodes for more information.

About

Opening and forwarding specific ports per docker container is ok for a few containers, the more ports you open the more it becomes a hasstle and totally not clear which ports map to which container. A simple but very effective solution is to use a socks5 proxy. In this episode I will show how to install and use a socks5 proxy and what benefits i…

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published