Skip to content

Support custom ports#46

Open
egnappahz wants to merge 3 commits into
kayrus:masterfrom
egnappahz:master
Open

Support custom ports#46
egnappahz wants to merge 3 commits into
kayrus:masterfrom
egnappahz:master

Conversation

@egnappahz

Copy link
Copy Markdown

No longer assume the port is 443/SSL

No longer assume the port is 443/SSL
Comment thread 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
Copy Markdown
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

kayrus commented May 19, 2022

Copy link
Copy Markdown
Owner

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

@egnappahz

Copy link
Copy Markdown
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.

egnappahz added 2 commits May 19, 2022 20:01
Signed-off-by: egnappahz <egnappah@gmail.com>
@kayrus kayrus force-pushed the master branch 7 times, most recently from 4a154e4 to 44cfd96 Compare July 3, 2025 14:42
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