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

Customization for specific countries #5832

Closed
runetfreedom opened this issue Oct 14, 2024 · 3 comments
Closed

Customization for specific countries #5832

runetfreedom opened this issue Oct 14, 2024 · 3 comments

Comments

@runetfreedom
Copy link
Contributor

@2dust Hello!

As I mentioned in #5829 the current default routing rules are useless for regions outside of China. To solve this problem, I suggest making support for “presets” for different regions based on the OS language.

What I mean is that when we initialize the default settings when we first start the program, we can automatically set parameters like program language, source of geo files and source of routing rule templates based on OS language. I am sure this will be useful at least for people from Russia and Iran. Maybe if the language is set to English we could show a window asking which preset to use from several options - China, Iran, Russia and Other.

So that's what I propose to do:

  1. Support for external sources of routing rule templates (let the default rule set also be provided inside the program).
  2. Support for presets that will just change other configuration options (alternatively just do it once on first run).
  3. Based on the preset, set the application language (only on first run), source of geo files and source of routing rule templates.
  4. At the first startup, ask the user which preset they would like to use in case we don't know where it comes from (not sure if this is necessary).

As for sources of routing rule templates, for Russia it would be great to use dynamic loading rules from github repository, as jsdelivr would be difficult to block in Russia, as it is used by a huge number of sites.

I'm ready to do it myself and submit a PR, but first I'd like to hear your opinion on whether you're ok with it.

Thank you!

@2dust
Copy link
Owner

2dust commented Oct 15, 2024

Each country is different just the routing ruleset.
So do the same as you did in your previous PR

  1. make a setting for the ruleset source of sing-box
  2. advanced routing rules import can choose different country preset

Give each option to the user

@runetfreedom
Copy link
Contributor Author

Ok, but since these settings are closely related, can I set them on first startup based on the OS language?

For example many users don't know that sing-box is started for tun mode, so if they naively set "geo source" + "route rules source" it will break them tun mode.

I closed my PR and will submit a new one when I implement at least sign-box srs sources support.

@2dust
Copy link
Owner

2dust commented Oct 15, 2024

https://github.com/2dust/v2rayN/wiki/Description-of-some-parameters

Look at this document.
A setup guiConfigs.zip file can be given to newbies in each country.
When they first start using it, they just need to download this file and unzip it into v2rayN\guiConfigs

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

2 participants