shadowsocks. U know.
e.g
# /etc/privoxy/config
forward-socks / 127.0.0.1:1080 .
listen-address 127.0.0.1:1081
service privoxy restart
after that,
http_proxy=http://127.0.0.1:1081 wget google.com
curl --socks5 127.0.0.1:1080 google.com
Well, here is a ssh solution.
For MacOS, u can access container by ssh tunnel:
# both host and container start sshd first
# inside host: make an alias for host
ifconfig lo0 alias <host-alias-ip>
# inside container
ssh -R <mapping-port-in-host>:localhost:<container-sshd-port> <host-alias-ip>
then,
# inside host
ssh <container>
# inside container
ssh <host>