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 support for importing routing rules via deep links #4280

Closed
kostyanp95 opened this issue Jan 18, 2025 · 0 comments
Closed

Add support for importing routing rules via deep links #4280

kostyanp95 opened this issue Jan 18, 2025 · 0 comments

Comments

@kostyanp95
Copy link

Add support for importing routing rules via deep link


Description:

Right now, V2RayNG supports importing connection settings through deep links, but it doesn’t allow importing routing rules. Adding this feature would make the app much more user-friendly, especially for advanced configurations.


Why this is useful:

  1. Users can quickly load routing rules from a web app or other sources with one click.
  2. It saves time compared to manually configuring or importing files;

How it could work:

Add support for a deep link like this:

v2rayng://routing-rules?rules=<encoded_rules>
  • <encoded_rules>: Base64-encoded JSON of routing rules.

Example Rules:

[
    {
        "domain": [
            "geosite:youtube",
            "geosite:facebook",
            "domain:googlevideo.com"
        ],
        "enabled": true,
        "locked": false,
        "outboundTag": "proxy",
        "remarks": "Blocked services"
    },
    {
        "domain": [
            "domain:speedtest.net"
        ],
        "enabled": true,
        "locked": false,
        "outboundTag": "proxy",
        "remarks": "Speedtest"
    },
    {
        "domain": [
            "regexp:.*$"
        ],
        "enabled": true,
        "locked": false,
        "outboundTag": "direct",
        "remarks": "Direct all"
    }
]

Encoded in Base64:

Ww0KICAgIHsNCiAgICAgICAgImRvbWFpbiI6IFsNCiAgICAgICAgICAgICJnZW9zaXRlOnlvdXR1YmUiLA0KICAgICAgICAgICAgImdlb3NpdGU6ZmFjZWJvb2siLA0KICAgICAgICAgICAgImRvbWFpbjpnb29nbGV2aWRlby5jb20iDQogICAgICAgIF0sDQogICAgICAgICJlbmFibGVkIjogdHJ1ZSwNCiAgICAgICAgImxvY2tlZCI6IGZhbHNlLA0KICAgICAgICAib3V0Ym91bmRUYWciOiAicHJveHkiLA0KICAgICAgICAicmVtYXJrcyI6ICJCbG9ja2VkIHNlcnZpY2VzIg0KICAgIH0sDQogICAgew0KICAgICAgICAiZG9tYWluIjogWw0KICAgICAgICAgICAgImRvbWFpbjpzcGVlZHRlc3QubmV0Ig0KICAgICAgICBdLA0KICAgICAgICAiZW5hYmxlZCI6IHRydWUsDQogICAgICAgICJsb2NrZWQiOiBmYWxzZSwNCiAgICAgICAgIm91dGJvdW5kVGFnIjogInByb3h5IiwNCiAgICAgICAgInJlbWFya3MiOiAiU3BlZWR0ZXN0Ig0KICAgIH0sDQogICAgew0KICAgICAgICAiZG9tYWluIjogWw0KICAgICAgICAgICAgInJlZ2V4cDouKiQiDQogICAgICAgIF0sDQogICAgICAgICJlbmFibGVkIjogdHJ1ZSwNCiAgICAgICAgImxvY2tlZCI6IGZhbHNlLA0KICAgICAgICAib3V0Ym91bmRUYWciOiAiZGlyZWN0IiwNCiAgICAgICAgInJlbWFya3MiOiAiRGlyZWN0IGFsbCINCiAgICB9DQpd

Notes:

This feature already exists in V2RayTun (Android) and Streisand (iOS). It would be great to see it in V2RayNG too!

@2dust 2dust closed this as not planned Won't fix, can't repro, duplicate, stale Jan 19, 2025
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