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

clean: modularize TCP connection handling #173

Merged
merged 1 commit into from
Mar 15, 2024
Merged

clean: modularize TCP connection handling #173

merged 1 commit into from
Mar 15, 2024

Conversation

fortuna
Copy link

@fortuna fortuna commented Mar 15, 2024

This PR clearly separates authentication, proxy request extraction and proxy handling. This is a move towards supporting multiple protocols.

New transports can be implemented to replace the authenticate call.

New proxy protocols can be implemented to replace the getProxyRequest call. We can even support multiple protocols by sniffing the connection requests.

The proxyConnection call shouldn't change with different protocols.

@fortuna fortuna requested a review from sbruens March 15, 2024 20:37
@fortuna fortuna requested a review from a team as a code owner March 15, 2024 20:38
Copy link

@sbruens sbruens left a comment

Choose a reason for hiding this comment

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

Nice, thanks for doing that so quickly! This will make the location of the IPKey metric more obvious.

@sbruens
Copy link

sbruens commented Mar 15, 2024

This PR clearly separates authentication, proxy request extraction and proxy handling. This is a move towards supporting multiple protocols.

New transports can be implemented to replace the authenticate call.

New proxy protocols can be implemented to replace the getProxyRequest call. We can even support multiple protocols by sniffing the connection requests.

The proxyConnection call shouldn't change with different protocols.

Would we want to create an interface where new proxy protocols would implement authenticate and getProxyRequest? Is that worth doing? Not sure what you prefer or what is most appropriate in Go.

@fortuna
Copy link
Author

fortuna commented Mar 15, 2024

Yes, we probably want to define some interface, but it still needs some cleanup.

@fortuna fortuna merged commit b9cb68e into master Mar 15, 2024
4 checks passed
@fortuna fortuna deleted the fortuna-clean branch March 15, 2024 20:52
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