Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

socat listen port #3

Open
RangerRU opened this issue Dec 13, 2023 · 6 comments
Open

socat listen port #3

RangerRU opened this issue Dec 13, 2023 · 6 comments

Comments

@RangerRU
Copy link

Hello
Can you change the socat port from 1080 to any other that is not used as standard proxy ports?

@aleskxyz
Copy link
Owner

Hi
What is your use case?
You can change the public port in docker run or docker compose.
For example use this:
9999:1080

@RangerRU
Copy link
Author

RangerRU commented Dec 15, 2023

I'm using XRay (Marzban, 3x-ui), port 1080 is used for the shadowsocks protocol (standard port)

{
"tag": "Shadowsocks TCP",
"listen": "0.0.0.0",
"port": 1080,
"protocol": "shadowsocks",
"settings": {
"clients": [],
"network": "tcp,udp"
}

fro entrypoint.sh:

socat tcp-listen:1080,reuseaddr,fork tcp:localhost:40000 &

netstat -plnut

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:1080 0.0.0.0:* LISTEN 316054/socat

@aleskxyz
Copy link
Owner

aleskxyz commented Dec 15, 2023

create a directory:

mkdir warp
cd warp

create a docker-compose.yml file with this content:

version: "3"
services:
  warp:
    image: aleskxyz/warp-svc:latest
    environment:
      WARP_LICENSE: xxxxxxxx-xxxxxxxx-xxxxxxxx
    ports:
    - 127.0.0.1:2323:1080
    restart: always
    volumes:
    - ./warp:/var/lib/cloudflare-warp

run docker compose:

docker compose up -d

Now you can use socks on 127.0.0.1:2323 and use it in xray

@RangerRU
Copy link
Author

does not work
port 1080 is busy a socat from docker
image

@puteulanus
Copy link

Hello, I support adding an environment variable to control the listening port of socat.

When I use --net=host so that WARP can use the host's IPv6 network stack, I cannot change the listening port using docker's port mapping, and 1080 is a very common port that is prone to conflicts.

aleskxyz pushed a commit that referenced this issue Apr 1, 2024
ci: add support for building arm64 image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants