-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
added support for multiple custom configs in subscriptions + remarks #2827
Conversation
Accepting both single config and multiple configs i.e: {customConfig} or [{customConfig1}, {customConfig2} ...] Furtheremore added an optional 'remarks' field to v2rayConfig class to keep remote customConfig name.
Its a good change |
@vfarid Thank you. Please give a sample including 2 custumConfigs with remark. |
@vfarid @2dust I tested below single-config. It can be imported via subscription successfully, but the "remarks" field doesn't appeared in imported config.
Also, I tested a multi-config as below. Importing wan not successful.
|
@vfarid I posted 2 messages, can you reply? |
What do you mean? There is a sample right in previous panel: |
I said there, the first sample imported without remark, and the second sample can't be imported. |
|
@vfarid |
Because 1.8.15 dosent support it, its in master branch and will be available in next release. |
I wish the remark can also work on single custom config, please. |
You can just encapsulate your single-config in [ ] |
@vfarid When we use [{customConfig1}, {customConfig2}, {customConfig3} ...] the order of confings in subscription becomes reversed in v2rayNG: Also, all elements of each JSON become reversed. |
@vfarid |
What if we want to deliver like 100 configs to user? 100kb of config file? @vfarid |
Its not that heavy, btw the custom config format is detailed in xray-core. To keep compatibility, we need to follow the format. Furtheremore webservers usually gzip the output and they will reduce the boundle size using compression. |
@vfarid Thank you for implementing this feature. However, I’ve encountered an issue. When I send the ‘x’ JSON config via a sub-link, it functions as expected, but the remark doesn’t seem to work. Conversely, when I send my config enclosed in brackets (for example, [x] or [{x1}, {x2}, …]), the remark operates correctly, but the config(s) fail to initiate. However, if I send each of the individual configs (x1, x2, etc.) as a single config without brackets, they work well. |
I know the remark not working for single config and only works on arrays. I just keep single config for compatibility and didnt touch its functionality. For arrays ive tested several times and it is working as expected. For test, you can add multiple costom configs using sub and export each single configs seperately, you can see the import has been done correctly, so if your config dont work you need to investigate somewere else. |
Hi @vfarid, I encountered an issue while importing custom configurations. When I import custom configurations from my sub-link, some integer values are being displayed as float values in the program. This issue is causing my configurations to malfunction. But when I copy the configuration from the browser and import it, the issue does not occur. Do you have any ideas on how to resolve it? |
The problem is how it parses Json. It seems to have effect only on inbounds |
User level and dokem port is effected in my case |
Thank you very much, this is great. But unfortunately, some Integers parsed as float so it's not working. |
Some custom-configs with multiple formats in the subscription link are not imported correctly. For example, the following configuration will be imported correctly And it works properly, if it is individually in the subscription link: Subscription link content:
But if the above configuration is in multiple formats, it will not be imported correctly and some of its lines will be moved and will not work properly (The connection is established, but the fragment does not work): Subscription link content:
I guess, because some Integers parsed as float so it's not working. V2rayNG v1.8.17 (Lib v26, Xray core v1.8.8) |
display order of multiple custom-configs (Imported via subscription link) is sometimes reversed (sort from the last to the first), and sometimes the last config is displayed at the top of the list and the others are displayed in reverse (from the last to the first). In the example below, the configs are imported as follows: ServerLess_TLSFrag But the order is expected to be like this: Server-3 Subscription link content:
V2rayNG v1.8.17 (Lib v26, Xray core v1.8.8) |
Hi @vfarid
If i import a single config then its ok. But if i use the new feature this will drop this section and this config wont work. |
According to the documentation, observatory field is not supportrd by xray-core. |
We already use it in v2rayng . |
Also note that it has been considered in sanaei |
It is supported but not documented Also why does it even should be added. Shouldn't it just copy the configs? |
It is not implemented in v2rayNG till now, if you sure it is supported by xray-core (i didnt find it inside documentation), you may create a seperate issue/pr. |
Accepting both single config and multiple configs i.e: {customConfig} or [{customConfig1}, {customConfig2} ...]
Furtheremore added an optional 'remarks' field to v2rayConfig class to keep remote customConfig name.