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

Switch to using gonat instead of ipproxy #4

Merged
merged 37 commits into from
May 31, 2019
Merged

Switch to using gonat instead of ipproxy #4

merged 37 commits into from
May 31, 2019

Conversation

oxtoacart
Copy link
Contributor

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.

client.go Outdated Show resolved Hide resolved
client.go Outdated
sleepTime := 50 * time.Millisecond
maxSleepTime := f.idleTimeout

firstDial := true
writeLoop:
Copy link
Contributor

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?

Copy link
Contributor Author

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.

client.go Outdated Show resolved Hide resolved
@oxtoacart
Copy link
Contributor Author

@hwh33 I've pushed my code review changes

client.go Show resolved Hide resolved
client.go Show resolved Hide resolved
Copy link
Contributor

@hwh33 hwh33 left a comment

Choose a reason for hiding this comment

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

Looks good!

@oxtoacart
Copy link
Contributor Author

Thanks @hwh33!

@oxtoacart oxtoacart merged commit d92b641 into master May 31, 2019
@oxtoacart oxtoacart deleted the ox/gonat branch May 31, 2019 00:43
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.

None yet

2 participants