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

choose port to listen #14

Closed
fangxian opened this issue Oct 4, 2016 · 1 comment
Closed

choose port to listen #14

fangxian opened this issue Oct 4, 2016 · 1 comment
Labels

Comments

@fangxian
Copy link

fangxian commented Oct 4, 2016

We can listen to the port 01023 if we have the root access to run the program, however 11023 ports are "privileged" ports. It may not safe if we listen these ports.
So in the code
if (info.port < 0) {
fprintf(stderr, "ttyd: invalid port: %s\n", optarg);
return -1;
}
Do we need to change the condition if( info.port < 0) to if(info.port < 1024)?

@tsl0922
Copy link
Owner

tsl0922 commented Oct 5, 2016

I don't think listening on a "privileged" port is not safe, if you don't want to use root user to run the command, you can use the --uid and --gid option to run ttyd as other user and group.

@tsl0922 tsl0922 added the wontfix label Oct 5, 2016
@tsl0922 tsl0922 closed this as completed Oct 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants