-
Notifications
You must be signed in to change notification settings - Fork 3
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
Switch to using gonat instead of ipproxy #4
Conversation
client.go
Outdated
sleepTime := 50 * time.Millisecond | ||
maxSleepTime := f.idleTimeout | ||
|
||
firstDial := true | ||
writeLoop: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since there is no loop nesting here, why name this loop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think at one point I might have had a nested loop. This function is too long, I'll factor out the substantial portion of the dialing code into its own function and remove the loop label.
@hwh33 I've pushed my code review changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Thanks @hwh33! |
Instead of terminating client connections at the packetforward proxy, but using gonat we now simply pass packets through to the upstream origin, performing NAT in the process. This should reduce memory usage and hopefully improve performance/stability.