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 functionality to edit/add fragment to configs #2832
Conversation
It will be realy useful for users |
It could make v2rayN so flexible to modify configs as easiest way as possible |
https://xtls.github.io/config/outbounds/freedom.html#outboundconfigurationobject fragment can only be used with freedom |
You can customize the configuration using fragment |
Most of users can't edit config and use fragments, It's easier if able to set it frome ui🙏 |
Yep, i will fix it. |
…nfigs - Added `outboundFragmentBean` property to `ServerConfig` in order to fix previous fault and have fragment as freedom protocol in outbounds array and all its consequences. - Added `fragment` property to vless/vmess config str for both import and share actions.
I did some changes to fix my previous fault (moving fragment to freedom protocol) and added possibility to import/share fragment in configs. |
@vfarid
It would be good to be a compatibility across all clients. |
I added this feature as well but the order is different. Since the main i tem is packet and then lenght, i ordered them like "packets,length,interval". I dont have any idea what app you are referring to which accept fragment in configs, but i think this is the right order. |
@vfarid I will check. Also please add Mux. There are 3 parameters for Mux.
|
I checked again in Streisand, in exported config the order is: "length,interval,packets" and supports Mux (1 parameter only).
So, Striesand accepts both and itself handles the order of parameters. |
@2dust please take a look at new commits on my pr, i fixed what you said about freedom protocol and added fragment to configs str as well.
{
"dns": {
"hosts": {
"domain:googleapis.cn": "googleapis.com"
},
"servers": [
"1.1.1.1"
]
},
"inbounds": [
{
"listen": "127.0.0.1",
"port": 10808,
"protocol": "socks",
"settings": {
"auth": "noauth",
"udp": true,
"userLevel": 8
},
"sniffing": {
"destOverride": [
"http",
"tls"
],
"enabled": true
},
"tag": "socks"
},
{
"listen": "127.0.0.1",
"port": 10809,
"protocol": "http",
"settings": {
"userLevel": 8
},
"tag": "http"
}
],
"log": {
"loglevel": "warning"
},
"outbounds": [
{
"mux": {
"concurrency": -1,
"enabled": false,
"xudpConcurrency": 8,
"xudpProxyUDP443": ""
},
"protocol": "vless",
"settings": {
"vnext": [
{
"address": "104.17.138.140",
"port": 2096,
"users": [
{
"encryption": "none",
"flow": "",
"id": "ebc4a168-a6fe-47ce-bc25-6183c6212dcc",
"level": 8,
"security": "auto"
}
]
}
]
},
"streamSettings": {
"network": "ws",
"security": "tls",
"tlsSettings": {
"allowInsecure": false,
"alpn": [
"h2"
],
"fingerprint": "ios",
"publicKey": "",
"serverName": "sub.vfarid.workeRS.dEv",
"shortId": "",
"show": false,
"spiderX": ""
},
"wsSettings": {
"headers": {
"Host": "sub.vfarid.workeRS.dEv"
},
"path": "vless-ws/?ed=2048"
}
},
"tag": "proxy"
},
{
"mux": {
"concurrency": 8,
"enabled": false,
"xudpConcurrency": 8,
"xudpProxyUDP443": ""
},
"protocol": "freedom",
"settings": {
"fragment": {
"interval": "10-20",
"length": "10-20",
"packets": "tlshello"
}
},
"tag": "fragment"
},
{
"protocol": "blackhole",
"settings": {
"response": {
"type": "http"
}
},
"tag": "block"
}
],
"routing": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"ip": [
"1.1.1.1"
],
"outboundTag": "proxy",
"port": "53",
"type": "field"
}
]
}
} |
@vfarid Please add mux as well. In some cases without mux, fragment doesn't work properly. |
Mux is already implemented as a global setting. |
@vfarid Yes, I know it. But cant be controlled via subscription. And it isn't good to enable Mux totally instead of a specific config. |
|
Please note that fragment needs to use chain proxy |
@2dust thanks for your review and i understand its may not needed for all countries at the time but for iran it is a need.
Furtheremore, in iran we need scanner for cloudflare's clean IP and since every operator have different mechanism, this should be done on user's device. Do you think it is acceptable to add an internal ip scanner in this app? If so i can work on it as well. Thank you in advance. |
Please use custom configuration to test whether the fragment is valid first.if valid then
This is unnecessary |
Ok, plase take a look at this comment as well to make sure it works: |
Hello @2dust With all due respect, I believe adding custom config is not user-friendly. |
@2dust Hello Again, |
Added functionality to config editor interface and make it poosible to add/edit fragment setting using UI: