Skip to content

Update README.md Docker Commands and default udp port#55

Merged
elementbound merged 11 commits intofoxssake:mainfrom
Mondanzo:patch-1
Sep 10, 2024
Merged

Update README.md Docker Commands and default udp port#55
elementbound merged 11 commits intofoxssake:mainfrom
Mondanzo:patch-1

Conversation

@Mondanzo
Copy link

@Mondanzo Mondanzo commented Aug 4, 2024

Fixed Docker Commands not lining up with the .env.example

📓 Description

Updates the readme with appropiate docker commands for port forwarding.

☑️ Checklist

  • Documentation is up to date
  • Versions are bumped as needed

🔗 Related issues

foxssake/netfox#218

Copy link

@elementbound elementbound left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for raising all these! It seems there were indeed issues with the README. Added some notes. Could you also please bump the version in package.json from 1.4.2 to 1.4.3 please?

Also sorry for the late review, initially the diff showed full files instead of just a few lines changed, and then got carried away with other stuff.

.env.example Outdated

# Port where noray listens for UDP relay requests from hosts
NORAY_UDP_REGISTRAR_PORT=8809
NORAY_UDP_REGISTRAR_PORT=8890

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change? The default registrar port is 8809 as can be seen here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea behind the change was to use the same port number as TCP to avoid having varying protocol ports open across different ports. Made it for me just easier to be aware of which ports are actually open and not feel like "wasting" any ports. I didn't get too deep into the code when I made that change to see there is a default option set, in hindsight that makes a lot of sense.

README.md Outdated
```
docker build . -t noray
docker run -p 8090:8090 -p 8091:8091 --env-file=.env -t noray
docker run -p 8890:8890 -p 8890:8890/udp -p 8091:8091 --env-file=.env -t noray

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on default config, noray listens on 8890 TCP for commands, 8891 UDP for registrar, and 8891 HTTP for exposing metrics.

Suggested change
docker run -p 8890:8890 -p 8890:8890/udp -p 8091:8091 --env-file=.env -t noray
docker run -p 8890:8890 -p 8891:8891/udp -p 8891:8891 --env-file=.env -t noray

README.md Outdated
Or run prebuilt docker:
```
docker run -p 8090:8090 -p 8091:8091 --env-file=.env -t ghcr.io/foxssake/noray:main
docker run -p 8890:8890 -p 8890:8890/udp -p 8091:8891 --env-file=.env -t ghcr.io/foxssake/noray:main

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

Suggested change
docker run -p 8890:8890 -p 8890:8890/udp -p 8091:8891 --env-file=.env -t ghcr.io/foxssake/noray:main
docker run -p 8890:8890 -p 8891:8891/udp -p 8891:8891 --env-file=.env -t ghcr.io/foxssake/noray:main

README.md Outdated
docker run -p 8890:8890 -p 8890:8890/udp -p 8091:8891 --env-file=.env -t ghcr.io/foxssake/noray:main
```

_Please Note: This configuration will only allow NAT Punching but no port forwarding. Make sure to add `-p 49152-51200:49152-51200/udp` to allow all default udp relay ports. Beware! This will increase the deploy time severely!_

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to call it relaying, just to stay consistent with the existing docs.

Suggested change
_Please Note: This configuration will only allow NAT Punching but no port forwarding. Make sure to add `-p 49152-51200:49152-51200/udp` to allow all default udp relay ports. Beware! This will increase the deploy time severely!_
_Please Note: This configuration will only allow NAT punchthrough but no relaying. Make sure to add `-p 49152-51200:49152-51200/udp` to allow all default udp relay ports. Beware! This will increase the deploy time severely!_

@elementbound
Copy link

PR looks good, I plan to add some finishing touches and merge. I've run into some weird issue locally where the connection doesn't go through for some reason ( as opposed to the tomfol.io instance ). Will merge once I figure that out.

@elementbound elementbound merged commit 5924a20 into foxssake:main Sep 10, 2024
@elementbound
Copy link

Thanks for the PR @Mondanzo, merged!

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

Successfully merging this pull request may close these issues.

2 participants

Comments