Skip to content

feat(client-template): add possibility to use vless flow and uuid in client template#405

Open
KlimSemikin wants to merge 1 commit intoPasarGuard:devfrom
KlimSemikin:dev
Open

feat(client-template): add possibility to use vless flow and uuid in client template#405
KlimSemikin wants to merge 1 commit intoPasarGuard:devfrom
KlimSemikin:dev

Conversation

@KlimSemikin
Copy link
Copy Markdown
Contributor

Add possibility to use uuid and flow variables in client template. You can add second outbound with same user uuid with this changes. It can be used with observer for example and pick different oubounds by ping etc

  "outbounds": [
    {
      "protocol": "vless",
      "settings": {
        "vnext": [
          {
            "address": "...",
            "port": 443,
            "users": [
              {
                "encryption": "none",
                "flow": "{{ flow }}",
                "id": "{{ uuid }}"
              }
            ]
          }
        ]
      },
      ...
      "tag": "germany"
    }

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 23, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b7e28a06-931a-4461-8c5a-2c58d6516abd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@M03ED
Copy link
Copy Markdown
Contributor

M03ED commented Apr 23, 2026

And why you should do this ?

@KlimSemikin
Copy link
Copy Markdown
Contributor Author

KlimSemikin commented Apr 23, 2026

And why you should do this ?

I use it like this one:

{
  "inbounds": [
    {
      ... 
    }
  ],
  "outbounds": [
    {
      // main config from panel
      "tag": "proxy"
    },
    {
      "protocol": "vless",
      "settings": {
        "vnext": [
          {
            "address": "domain2.xyz",
            "port": 443,
            "users": [
              {
                "encryption": "none",
                "flow": "{{ flow }}",
                "id": "{{ uuid }}"
              }
            ]
          }
        ]
      },
      "streamSettings": {
        "network": "raw",
        "security": "tls",
          "fingerprint": "chrome",
          "serverName": "domain2.xyz"
        }
      },
      "tag": "germany"
    },
    {
      "tag": "direct",
      "protocol": "freedom"
    },
    {
      "tag": "block",
      "protocol": "blackhole"
    }
  ],
  "observatory": {
    "subjectSelector": [
      "germany"
    ],
    "probeUrl": "https://captive.apple.com/hotspot-detect.html",
    "probeInterval": "10s",
    "enableConcurrency": false
  },
  "routing": {
    "domainStrategy": "IPIfNonMatch",
    "balancers": [
      {
        "tag": "balancer",
        "selector": [
          "germany"
        ],
        "fallbackTag": "proxy"
      }
    ],
    "rules": [
      {
        "inboundTag": [
          "socks"
        ],
        "balancerTag": "balancer"
      }
    ]
  }
}

Main outbound "proxy" that added automatically by pasarguard uses CDN. I want to use cdn with paid traffic only for mobile networks with enabled whitelist blocks. So i don`t want to pay for users forgot enable another default config if they using wi-fi (without whitelist blocks). "proxy" will be used only if "germany" is not available. With {{ uuid }} second config will be related to same user with all trafic counting and so on

With this feature we get more possibilities for customise client configs and create more flexible configs with many outbounds related with current user

@M03ED M03ED force-pushed the dev branch 3 times, most recently from e25442c to 1735798 Compare May 1, 2026 21:39
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.

2 participants