-
Notifications
You must be signed in to change notification settings - Fork 1
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
Adding SNI config support #1396
Merged
Merged
Changes from 6 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
ff4ef7a
Merge branch 'main' of github.com:getlantern/flashlight
WendelHime 7ded24f
Merge branch 'main' of github.com:getlantern/flashlight
WendelHime bd87cf1
Merge branch 'main' of github.com:getlantern/flashlight
WendelHime 1f0456c
feat: adding config fronting SNIs
WendelHime 6f91aad
feat: moving SNI Config struct definition to fronted so we can avoid …
WendelHime 31e60a2
chore: adding a small test for checking if it's loading the fronting …
WendelHime 847fb2e
fix: adding a list of SNIs to the default list
WendelHime 26bc68d
fix: using default config when region couldn't be found
WendelHime f2c553c
fix: checking if arbitrary region is empty and if it is use the defau…
WendelHime 98e13f0
fix: updating fronted version
WendelHime d9f42b9
fix: using arbitrary SNIs by default
WendelHime ec17273
fix: setting default arbitrary SNIs use as false and check if for tha…
WendelHime 6d1f124
feat: adding arbitrary sni list for cn
WendelHime File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We want to fall back to the default SNI config if
sniRegion
does not appear inp.FrontingSNIs
. Currently, if there is no entry inp.FrontingSNIs
forsniRegion
, thensniConfig
will never be populated (sniConfig.UseArbitrarySNIs
will be ignored becausesniConfig != nil
will fail).I think we instead want something like:
Or am I misunderstanding something?
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.
aaaa I have misunderstood, I thought we only want to use the default arbitrary list when the region has an empty arbitrary list, will fix that soon
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.
Wait I didn't misunderstood, the provided example does mention that, if there are no arbitrary sni provided and we want to use it, we will use it from the default section (see cn example and comment):
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.
The example looks good and your updated code implements it correctly!