Skip to content

Compare ip and port for loop#36

Merged
linyows merged 1 commit intomainfrom
compare-ip-and-port
Apr 5, 2024
Merged

Compare ip and port for loop#36
linyows merged 1 commit intomainfrom
compare-ip-and-port

Conversation

@linyows
Copy link
Owner

@linyows linyows commented Apr 5, 2024

Fix for #34

@linyows linyows merged commit 88bd49f into main Apr 5, 2024
@linyows linyows deleted the compare-ip-and-port branch April 5, 2024 07:09
@fatalbanana
Copy link
Contributor

The server responds poorly to being connected to directly. It's worth running with GOMAXPROCS=1 for testing so it blows up gently.

@linyows
Copy link
Owner Author

linyows commented Apr 15, 2024

Could you please provide me with more information? I don't understand.

@fatalbanana
Copy link
Contributor

Could you please provide me with more information? I don't understand.

I suspect this check doesn't work as intended at least when connections aren't really redirected at all & the machine is handling a connection from the localhost. So if one would run the server & connect to it it will crash or hang the machine.

$ CGO_ENABLED=0 go build ./cmd/warp # build
$ GOMAXPROCS=1 ./warp -port 2024 # run it with GOMAXPROCS=1 so it won't hurt you
$ telnet localhost 2024 # connect! it will die with a large stacktrace

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