dockerfiles icon indicating copy to clipboard operation
dockerfiles copied to clipboard

how to use socks5 proxy

Open JeevansSP opened this issue 2 years ago • 8 comments

like the heading says, how do i use socks5 proxy , as it contains user and pass, where do i pass those here

docker run --privileged=true --net=host -d ncarlier/redsocks 1.2.3.4 3128

JeevansSP avatar May 09 '22 19:05 JeevansSP

@ncarlier

JeevansSP avatar May 09 '22 22:05 JeevansSP

Hi, embedded configuration file is quite basic and don't set user/password. Your best option is to create your own redsocks.tmpl file and mount it:

docker run --privileged=true --net=host \
  -v whitelist.txt:/etc/redsocks-whitelist.txt \
  -v redsocks.tmpl:/etc/redsocks.tmpl \
  -d ncarlier/redsocks 1.2.3.4 3128

ncarlier avatar May 10 '22 07:05 ncarlier

suppose i have a k8s cluster , and im trying to deploy many pods , each pod will have two containers, this one and my app, i want the app to run through proxy , and then scale this up , each pod needs to have a seprate socks5 proxy (i will provide valid ones), is this possible?

JeevansSP avatar May 10 '22 18:05 JeevansSP

@ncarlier

AvgAwsmDude avatar May 11 '22 14:05 AvgAwsmDude

Mmmm I don't think so as this Docker image was built for standalone Docker use to use a global proxy for all containers running on the host. modify the host's network The entrypoint used iptable to modify the host's network. It may be a problem with the K8S network. Your needs seem to be simpler. Just create a genuine redsock image and configure your service to use this container as a proxy socks?

ncarlier avatar May 12 '22 07:05 ncarlier

@ncarlier okay got it, can i use your image , run it and then pass custom rules in redsocks.tmpl , where I map my other instances of my apps running on docker to diff proxies I provide?

JeevansSP avatar May 12 '22 08:05 JeevansSP

will that give all the the different docker containers their own proxies (which I provide)

JeevansSP avatar May 12 '22 08:05 JeevansSP

can i kindly contact you elsehwere ? twitter or gmail or something?

JeevansSP avatar May 12 '22 08:05 JeevansSP