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

[HELP] Stream proxy #204

Closed
barto95100 opened this issue Jun 16, 2024 · 7 comments
Closed

[HELP] Stream proxy #204

barto95100 opened this issue Jun 16, 2024 · 7 comments
Labels
docker This issue related to docker version of zoraxy help wanted Extra attention is needed

Comments

@barto95100
Copy link

Hi,

I configure the stream proxy :

CleanShot 2024-06-16 at 22 53 47

but when I test to tcpdump to 192.168.1.243 if the traffic forward from zoraxy nothing in tcpdump..

i'm wrong on configuration ? or other config is necessary ?

zoraxy 3.0.6
Docker
Router NAT port 25 -> zoraxy -> to 192.168.1.243:25

thank's for your help

@barto95100 barto95100 added the help wanted Extra attention is needed label Jun 16, 2024
@tobychui
Copy link
Owner

tobychui commented Jun 17, 2024

@barto95100 Just to make sure you setup everything correctly, you have enabled TCP port forward / mapping thing in docker right? Have you click "Refresh" to check if your service is actually running and not exited after running for a few seconds?Can I have your docker config and your wireshark capture?

Updates

After some testing the TCP proxy function indeed working and issue above cannot be reproduced. Check your docker networking config and seek for professional IT support if needed.

@tobychui tobychui added the docker This issue related to docker version of zoraxy label Jun 17, 2024
@barto95100
Copy link
Author

barto95100 commented Jun 17, 2024

@tobychui this is my config docker:

version: '3.3'
services:
  zoraxy-docker:
    image: zoraxydocker/zoraxy:latest
    container_name: zoraxy
    ports:
      - 80:80
      - 443:443
      - 25:25
      #- 8008:8000/tcp
    volumes:
      - /home/docker/zoraxy:/opt/zoraxy/config/
    environment: 
      ARGS: '-fastgeoip=true'

the tcpdump: (zoraxy host)

10:09:31.824616 IP 209.85.128.179.54692 > 192.168.99.10.25: Flags [S], seq 1479559046, win 64240, options [mss 1460,sackOK,TS val 3894682929 ecr 0,nop,wscale 7], length 0
10:09:31.824766 IP 192.168.99.10.25 > 209.85.128.179.54692: Flags [R.], seq 0, ack 1479559047, win 0, length 0
^C
2 packets captured
2 packets received by filter
0 packets dropped by kernel

and draw to explain:
image

and i check i check the service, is started:
image

@tobychui
Copy link
Owner

@barto95100 Have you try to change the listening address to your docker container WAN address instead?
Sorry I am not experience in docker, but when I test Zoraxy outside of docker it works perfectly fine. If you need further help, you can tag PassiveLemon and ask for some new ideas.

@barto95100
Copy link
Author

I don't understand:

Have you try to change the listening address to your docker container WAN address instead?

My container zoraxy have 172.23.0.2

this is the tcpdump on interface network used by zoraxy on docker network:

tcpdump -i br-5ea7e450a6d3 port 25
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on br-5ea7e450a6d3, link-type EN10MB (Ethernet), snapshot length 262144 bytes
15:15:41.046509 IP mail-wm1-f51.google.com.42474 > 172.23.0.2.smtp: Flags [S], seq 857561589, win 64240, options [mss 1460,sackOK,TS val 421145845 ecr 0,nop,wscale 7], length 0
15:15:41.046559 IP 172.23.0.2.smtp > mail-wm1-f51.google.com.42474: Flags [R.], seq 0, ack 857561590, win 0, length 0
^C
2 packets captured
2 packets received by filter
0 packets dropped by kernel

I don't know why the zoraxy dont forward the packet..

Log possible in specify file in container ?

@PassiveLemon maybe idea ?

thank's

@tobychui
Copy link
Owner

tobychui commented Jun 17, 2024

Maybe I can give a bit of context on how that listening address works.
This is the code that parse the listening address before it enters the TCP / UDP connection copy go routines

listenerStartingAddr := allowPort
	if isValidPort(allowPort) {
		//number only, e.g. 8080
		listenerStartingAddr = "0.0.0.0:" + allowPort
	} else if strings.HasPrefix(allowPort, ":") && isValidPort(allowPort[1:]) {
		//port number starting with :, e.g. :8080
		listenerStartingAddr = "0.0.0.0" + allowPort
	}

So if you are only filling in :port, then it defaults to 0.0.0.0:port. I am not sure if docker don't like it or not and causes the above issues.

@barto95100
Copy link
Author

Ok, @tobychui i reboot the virtual machine and it's ok now (no config modify) strange :(

@tobychui
Copy link
Owner

Uhhh ok, please close this if your problem has been resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker This issue related to docker version of zoraxy help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants