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

Regarding the issue of open ports #1922

Open
ArthurSun1 opened this issue Nov 6, 2023 · 1 comment
Open

Regarding the issue of open ports #1922

ArthurSun1 opened this issue Nov 6, 2023 · 1 comment

Comments

@ArthurSun1
Copy link

Hello, when I was looking at the project source code file, I found these comments in the src/Cedar/Server.h file.
#define SERVER_DEF_PORTS_INCLIENT_1 995
#define SERVER_DEF_PORTS_INCLIENT_2 465
#define SERVER_DEF_PORTS_INCLIENT_3 9008 // for admin (in client)
#define SERVER_DEF_PORTS_INCLIENT_4 1195
I have some questions about these ports. These ports are not used to actually establish the connection. What do these ports mean?

@officialh1
Copy link

These are not comments in compiler language these are static compiler variables. The compiler will replace them where they are referenced when complied, if I recall my C days correctly. I believe these are simply the default ports used in some cases are the only ports used in other cases (depending on the use case). For example, for port 9008, the comment is for admin (in client) only. This might mean it's using this port on loopback likely OR it's a statically used port for management that cannot be changed...unless you change it here and recompile. I couldn't tell you since I haven't reviewed the code. But when you build a socket, you need an IP address and a port (IP:Port). Without those you cannot have a socket (this is true for outbound and inbound connections, but outbound is usually randomized), so sometimes defaults are needed so things just work even if only in their own little world when initializing. These are likely inbound or listener ports.

Based on my history with this application, this would be typically server to server or admin client to server ports. Not VPN client ports.

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

2 participants