-
Notifications
You must be signed in to change notification settings - Fork 55
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
chore: use config block list instead of allow list #247
Conversation
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 code looks good, with some small questions.
} | ||
for key, value := range configMap { | ||
switch key { | ||
case "DisableLocalHTTPProxy", "DisableLocalSocksProxy": |
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 are still digging into a specific field in the config. Not sure whether this is breaking the "black-box" or not.
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.
Because those fields are incompatible with the Outline SDK. The key change in this PR is from specifying what fields to allow to specifying what fields to now allow. So Psiphon config - disallowed fields is a black box now.
if b != true { | ||
return nil, fmt.Errorf("field %v must be true if set", key) | ||
} | ||
case "DataRootDirectory": |
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.
Why don't we allow customers to specify their own DataRootDirectory
?
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.
Because that must be specified via the DialerConfig.DataRootDirectory. This makes it clear what they should be setting vs what is provided by Psiphon.
change to field blocklist Fix doc Tweak Minor cleanup
With this change, instead of allow listing specific config fields, we block the ones that should be set by the application developer instead. This should address Psiphon's concern about treating the config as a black box.
I also figured out a trick to make the Go docs work: instead of setting the build tag restrictions on all files, I only add to one, which is required to build the entire package. This allows the documentation to be generated without setting the build tag.