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

Support custom ports #46

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Support custom ports #46

wants to merge 3 commits into from

Conversation

egnappahz
Copy link

No longer assume the port is 443/SSL

No longer assume the port is 443/SSL
pkg/link/link.go Outdated
serverIPs, err := net.LookupIP(server)
servername := strings.SplitN(server, ":", -1)[0]
serverport := strings.SplitN(server, ":", -1)[1]
log.Printf("Eggz: Server: %q", servername)
Copy link
Owner

Choose a reason for hiding this comment

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

What is Eggz?

@kayrus
Copy link
Owner

kayrus commented May 19, 2022

Thanks for a PR. I'd suggest to use https://pkg.go.dev/net#SplitHostPort to obtain hostname and port

@egnappahz
Copy link
Author

Oh, im not even a GO dev. You can deny my pull request and change it as you see fit, but I can confirm this is a working concept when you give a server url with a custom port.

for example, It will probably fail when you dont give a port in the url, so this pull request is just a sloppy proof of concept. You prolly have to fall back to the default 443 port when no port is given or something like that.

Signed-off-by: egnappahz <egnappah@gmail.com>
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