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

OnlineConfigResolver: add User-Agent #2978

Merged
merged 2 commits into from
Oct 11, 2020
Merged

Conversation

betaxab
Copy link
Contributor

@betaxab betaxab commented Oct 9, 2020

Signed-off-by: Beta Soft betaxab@gmail.com

Please follow the guide below

  • You will be asked some questions, please read them carefully and answer honestly

  • Put an x into all the boxes [ ] relevant to your pull request (like that [x])

  • Use Preview tab to see how your pull request will actually look like

  • Searched for similar pull requests

  • Compiled the code with Visual Studio

  • Require translation update

  • Require document update (readme.md, wikipage, etc)

What is the purpose of your pull request?

  • Bug fix
  • Improvement
  • New feature

Description of your pull request and other information

Explanation of your pull request in arbitrary form goes here. Please make sure the description explains the purpose and effect of your pull request and is worded well enough to be understood. Provide as much context and examples as possible.

User-Agent should be added to httpClient to get online configuration.
Use the shadowsocks-windows owns name ShadowsocksWindows/{UpdateChecker.Version} instand of Web Browser default UA should be better, help online configuration API determine the client type.

@database64128 database64128 requested review from a user, celeron533 and Stzx October 9, 2020 17:31
Copy link

@DuckSoft DuckSoft left a comment

Choose a reason for hiding this comment

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

This is very appropriate for now. Maybe in the future we could make OnlineConfig User-Agent user-editable as well. LGTM.


some other thoughts: when you declare you are 'Shadowsocks-Windows' in User-Agent, this means that you shouldn't pass this packet directly in censored channels, for example, passing it through plain HTTP. Some restrictions might be required.

Signed-off-by: Beta Soft <betaxab@gmail.com>
- For OnlineConfigResolver and GeositeUpdater
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.

4 participants