XRAY-JSON Subscription | Proposal #3765
Replies: 5 comments 29 replies
-
直接订阅 JSON,我觉得可以有, 现在 Xray 配置最大的问题就是出站写法过于复杂,@mmmray 开个 PR 把层层包裹去掉吧, |
Beta Was this translation helpful? Give feedback.
-
Is V2rayNG not doing this already? |
Beta Was this translation helpful? Give feedback.
-
我觉得只需要一个出站就够了 DNS怎么填路由怎么填客户端作者更清楚 有的东西由远端下放总感觉有点奇怪 也有先例比如clash发放的配置入站监听0000导致有的人端口可以被扫到 |
Beta Was this translation helpful? Give feedback.
-
Isn't 'Proposal' supposed to be something new? |
Beta Was this translation helpful? Give feedback.
-
you have to mind that using whole JSON configuration as a subscription has some security flaws, for instance you can set reverse proxy or any unintentionally configuration on the client device I've tested reverse proxy on v2rayNG and it works... easily possible to use the internet of user for any purpose |
Beta Was this translation helpful? Give feedback.
-
Xray-JSON Subscription
Dear members of our large community!
I invite you to an open discussion regarding the Xray-JSON Subscription.
0. Abstract
Significant time has passed since the introduction of the V2ray-link standard for distributing configurations. With the global adoption of xray-core, there is a need for a more flexible and convenient way to distribute configurations for connecting to proxy services.
The growing popularity of XTLS has led to an increase in the number of sellers and, consequently, their clients. Unfortunately, the technical expertise of these clients varies greatly, requiring more attention to certain configuration parameters to ensure the security of the proxy server.
In particular, we are talking about providing routing, DNS, and other settings. Currently, each client-side proxy application defines its own way of providing additional instructions and parameters, which negatively impacts the overall user experience.
This document proposes to structure and generalize existing solutions to this problem into an agreement for representing subscriptions in JSON format.
We will cover the key principles, requirements, and usage examples of this configuration distribution format, and define the behavior of client-side proxy applications when encountering this method of configuration distribution.
1. Agreement
First, we need to define the basic rules, without which further agreement is invalid.
1.1 Use of HTTPS
The client application can only process this type of subscription if it was received over an encrypted channel. If the proxy client receives such content in plain text, it must return an error.
1.2 Case Sensitivity
All parameter names and string literals within the subscription content must be case-sensitive.
2. Overview
2.1 General Representation
In this agreement, we define a subscription (or group) as an array of connections in text form, where each element of the array is a fully valid JSON configuration based on the xray-core documentation, with the inclusion of several additional fields in each array element.
The general appearance of the subscription (group) provided to the proxy client should be as follows:
Note:
Core settings passed in the JSON configuration have higher priority than settings defined in the proxy application.
EXAMPLE
2.2 Connection
As we defined earlier, this array includes at least one or more elements. In our agreement, each individual element is a separate, isolated connection. Each element (connection) must comply with the requirements set forth in the xray-core documentation.
EXAMPLE
2.2.1 REMARK Field
To improve user experience, each element of the configuration array can contain a
remark
field:Note:
If this parameter is present, the proxy client must set the corresponding connection name in the GUI.
Note:
If this parameter is absent or its value is declared as
NULL
, the client is free to set the connection name at its own discretion.3. Meta-information
Along with the configuration file itself, the client can receive the following headers to represent additional meta-information:
3.1 profile-title
Example:
Note:
If this header is present, the client should set this value as the name of the subscription/group in the GUI.
Note:
If the value of this header is
NULL
, the client can set the name of the subscription/group at its own discretion.3.2 profile-update-interval
Example:
Note:
If this header is present, the client should set this automatic update interval for the subscription.
Note:
If the header is absent, the client is free to set the value at its own discretion.
3.3 subscription-userinfo
Information about the traffic and expiration date of the group
Example:
3.4 profile-web-page-url
Header containing the subscription link
Example:
Beta Was this translation helpful? Give feedback.
All reactions