# Proxy problem and CLI connection

**URL:** <https://forums.docker.com/t/proxy-problem-and-cli-connection/146551>\
**Category:** Docker Desktop\
**Tags:** docker-compose, windows\
**Created:** [February 9, 2025, 3:26pm UTC](https://forums.docker.com/t/proxy-problem-and-cli-connection/146551 "2025-02-09T15:26:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![oshritamar](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/oshritamar/32/56876_2.png) [@oshritamar](https://forums.docker.com/u/oshritamar)\
**Post date:** [February 9, 2025, 3:26pm UTC](https://forums.docker.com/t/proxy-problem-and-cli-connection/146551/1 "2025-02-09T15:26:01Z")

</div>

hi im using docker containers to connect to a user in a program and im using CLI key to connect  
i connect the proxy and i saw the proxy connected i the container but when i connect to the program in the container with the CLI, when i open the program dashbord i see my real IP adress and not my proxy IP and i double and triple check too many times that all setup correctly  
i just need an advice or a fix to this problem

**at the end** - i need to connect a container with proxy to my program spacificly with CLI key and in the the program in the dashboard tab i want to see that i connected with proxy IP insted my real IP.

mention: i check in the container app the proxy with this line code - curl [ifconfig.me](http://ifconfig.me/)  
and i got my proxy but with the CLI its not working

1. i create image with dockerfile vary standart
2. i create docker container with proxy setup host:port:username:password  
3.i check my ip address and it was vary good i saw the proxy working  
4.i run basic code to download and install the CLI in the container  
5.i run code to log in to my user wit the CLI
3. i got into the dashboard and saw that my real IP address there connected and not my proxy IP

this is the docker file:

```auto
# Use Alpine as base image for smaller size
FROM alpine:latest

# Install required dependencies
RUN apk update && apk add --no-cache \
    wget \
    curl \
    ca-certificates \
    iproute2 \
    proxychains-ng

# Configure proxychains
RUN echo "strict_chain" > /etc/proxychains/proxychains.conf && \
    echo "proxy_dns" >> /etc/proxychains/proxychains.conf && \
    echo "[ProxyList]" >> /etc/proxychains/proxychains.conf && \
    echo "http I delete here the password and the username @45.39.212.132 8675" >> /etc/proxychains/proxychains.conf

# Download pawns-cli
RUN wget --no-check-certificate -O pawns-cli https://cdn.pawns.app/download/cli/latest/linux_x86_64/pawns-cli && \
    chmod +x pawns-cli

# Create startup script with parameters
RUN echo '#!/bin/sh' > /start.sh && \
    echo 'proxychains -f /etc/proxychains/proxychains.conf ./pawns-cli \' >> /start.sh && \
    echo ' -accept-tos \' >> /start.sh && \
    echo ' -email "$PAWNS_EMAIL" \' >> /start.sh && \
    echo ' -password "$PAWNS_PASSWORD" \' >> /start.sh && \
    echo ' -device-name "$DEVICE_NAME" \' >> /start.sh && \
    echo ' -device-id "$DEVICE_ID"' >> /start.sh && \
    chmod +x /start.sh

# Set working directory
WORKDIR /

# Command to run
ENTRYPOINT ["/start.sh"]

```

also i tried a lot of changes in the docker file, in the proxies or in the code that set up the container.  
but same problem every time as i mention before

---

<div class="post-metadata">

**Author:** ![meyay](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/meyay/32/34000_2.png) [@meyay](https://forums.docker.com/u/meyay)\
**Post date:** [February 9, 2025, 4:43pm UTC](https://forums.docker.com/t/proxy-problem-and-cli-connection/146551/2 "2025-02-09T16:43:30Z")

</div>

Can you rephrase your post and include more details, especially what and how exactly you did…

---

<div class="post-metadata">

**Author:** ![oshritamar](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/oshritamar/32/56876_2.png) [@oshritamar](https://forums.docker.com/u/oshritamar)\
**Post date:** [February 9, 2025, 9:27pm UTC](https://forums.docker.com/t/proxy-problem-and-cli-connection/146551/3 "2025-02-09T21:27:16Z")

</div>

is that better?  
ell me if you need any spacific info

---

<div class="post-metadata">

**Author:** ![meyay](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/meyay/32/34000_2.png) [@meyay](https://forums.docker.com/u/meyay)\
**Post date:** [February 10, 2025, 7:17am UTC](https://forums.docker.com/t/proxy-problem-and-cli-connection/146551/4 "2025-02-10T07:17:20Z")

</div>

I checked the git repo: [https://github.com/rofl0r/proxychains-ng](https://github.com/rofl0r/proxychains-ng)

> ProxyChains is a UNIX program, that hooks network-related libc functions  
> in DYNAMICALLY LINKED programs via a preloaded DLL (dlsym(), LD\_PRELOAD)  
> and redirects the connections through SOCKS4a/5 or HTTP proxies.  
> It supports TCP only (no UDP/ICMP etc).
> 
> The way it works is basically a HACK; so it is possible that it doesn’t  
> work with your program, especially when it’s a script, or starts  
> numerous processes like background daemons or uses dlopen() to load  
> “modules” (bug in glibc dynlinker).  
> It should work with simple compiled (C/C++) dynamically linked programs  
> though.

Judging by the description, it is not a reliable solution that is guarantied to work with every application. There is not much we can do about it.

You will need to wait until someone experienced with proxychain-ng reads your post who actually know if and how pawns works with it.

---

<div class="post-metadata">

**Author:** ![oshritamar](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/oshritamar/32/56876_2.png) [@oshritamar](https://forums.docker.com/u/oshritamar)\
**Post date:** [February 10, 2025, 12:33pm UTC](https://forums.docker.com/t/proxy-problem-and-cli-connection/146551/5 "2025-02-10T12:33:08Z")

</div>

yes i will wait…  
ty for trying

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/docker/original/3X/d/4/d4fbccd46c81bfcffe9822e20e17736d946fa821.png) [@system](https://forums.docker.com/u/system)\
**Post date:** [February 20, 2025, 12:33pm UTC](https://forums.docker.com/t/proxy-problem-and-cli-connection/146551/6 "2025-02-20T12:33:27Z")

</div>

Closed on February 20, 2025, 12:33pm UTC

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
