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

Add possibility to match using SNI and source address #22

Open
georgmu opened this issue Sep 5, 2018 · 1 comment
Open

Add possibility to match using SNI and source address #22

georgmu opened this issue Sep 5, 2018 · 1 comment

Comments

@georgmu
Copy link

georgmu commented Sep 5, 2018

The Matcher has a context parameter, which is only initialized with context.TODO()

When doing some basic ACL stuff (e.g. allow access for sni foo from 10.0.0.0/8, deny from all), it would be nice to somehow have the source available in the matcher function. Since there already is a context, it would be nice to add the source to this context.

@georgmu
Copy link
Author

georgmu commented Sep 6, 2018

I solved the problem by wrapping the DialProxy in a ACLDialProxy, doing the subnet matching in HandleConn before calling HandleConn of the DialProxy.

Accessing the connection in the match function would still be nice

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

No branches or pull requests

1 participant