-
Notifications
You must be signed in to change notification settings - Fork 574
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
Optional json sub #890
Optional json sub #890
Conversation
add V2RAY_USE_JSON
check V2RAY_USE_JSON
add V2RAY_USE_JSON
may i ask why you avoid using custom config ? |
@M03ED it's advantageous to have that option as optional. I also had an idea of checking if V2RAY_SUBSCRIPTION_TEMPLATE was not set to "false" and providing JSON, but I wasn't sure if that would conflict with other parts of the code. If you believe that checking V2RAY_SUBSCRIPTION_TEMPLATE wouldn't cause problems, I will modify the code accordingly, so there is no need to add extra option in env. |
This can't be called an advantage
Share sub link instead of config |
@M03ED You are right custom configs are way better and I prefer them But I understand his pov and he does have point |
we discuss about this before , check #782 |
check this one too |
Custom config added to future version of v2rayN (not released yet), we will need something like this for v2rayN, because custom config will disable it's url-test/real-delay |
Personally, I prefer custom json config to be disabled by default. I like this configuration variable, but the implementation is a little bit wrong. |
app/views/subscription.py
Outdated
@@ -93,7 +94,7 @@ def get_subscription_user_info(user: UserResponse) -> dict: | |||
|
|||
elif re.match('^v2rayNG/(\d+\.\d+\.\d+)', user_agent): | |||
version_str = re.match('^v2rayNG/(\d+\.\d+\.\d+)', user_agent).group(1) | |||
if LooseVersion(version_str) >= LooseVersion("1.8.16"): | |||
if LooseVersion(version_str) >= LooseVersion("1.8.16") and V2RAY_USE_JSON.lower() != "false": |
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.
Also note that this is a boolean variable, so comparing this way is not suitable.
custom json is also supported in Streisand, we should add support for it too. |
@SaintShit Thank you for your guidance; I attempted to follow your advice. |
You can add it like v2rayng |
Added a simple 'env' option to allow for optional JSON configuration in subscriptions.