mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-07-17 13:21:06 +03:00
Merge branch 'extended' into extended-next
This commit is contained in:
24
DONATE.md
Normal file
24
DONATE.md
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# Support the project
|
||||||
|
|
||||||
|
If you want to support the project, you can donate to the following addresses.
|
||||||
|
|
||||||
|
### TRX (Tron)
|
||||||
|
```
|
||||||
|
TSWU6VUZ4FcUghYDmbbhK15gRVvhvBgW3F
|
||||||
|
```
|
||||||
|
### TON
|
||||||
|
```
|
||||||
|
UQAyD2UuT5kCP6lZQlhFL0hyNibDXNE4nIo_RSLVSYAtD7N1
|
||||||
|
```
|
||||||
|
### Solana
|
||||||
|
```
|
||||||
|
CJu8ickwRCwNE71uVFjYf1UveyCkRp9Xo44rhPcQpeFL
|
||||||
|
```
|
||||||
|
### Bitcoin
|
||||||
|
```
|
||||||
|
bc1qqx97p8k4dchqkyd47s4vf74hrqdfnmhqvcja7x
|
||||||
|
```
|
||||||
|
### Ethereum
|
||||||
|
```
|
||||||
|
0xAcc5919C22F2B3fAa0ec7E8BaD142da5B375FBF6
|
||||||
|
```
|
||||||
25
README.md
25
README.md
@@ -17,6 +17,31 @@ Sing-box with extended features.
|
|||||||
|
|
||||||
https://github.com/shtorm-7/sing-box-extended/tree/extended/examples
|
https://github.com/shtorm-7/sing-box-extended/tree/extended/examples
|
||||||
|
|
||||||
|
## Support the project
|
||||||
|
|
||||||
|
If you want to support the project, you can donate to the following addresses.
|
||||||
|
|
||||||
|
### TRX (Tron)
|
||||||
|
```
|
||||||
|
TSWU6VUZ4FcUghYDmbbhK15gRVvhvBgW3F
|
||||||
|
```
|
||||||
|
### TON
|
||||||
|
```
|
||||||
|
UQAyD2UuT5kCP6lZQlhFL0hyNibDXNE4nIo_RSLVSYAtD7N1
|
||||||
|
```
|
||||||
|
### Solana
|
||||||
|
```
|
||||||
|
CJu8ickwRCwNE71uVFjYf1UveyCkRp9Xo44rhPcQpeFL
|
||||||
|
```
|
||||||
|
### Bitcoin
|
||||||
|
```
|
||||||
|
bc1qqx97p8k4dchqkyd47s4vf74hrqdfnmhqvcja7x
|
||||||
|
```
|
||||||
|
### Ethereum
|
||||||
|
```
|
||||||
|
0xAcc5919C22F2B3fAa0ec7E8BaD142da5B375FBF6
|
||||||
|
```
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
"path": "/xhttp",
|
"path": "/xhttp",
|
||||||
"x_padding_bytes": "100-1000",
|
"x_padding_bytes": "100-1000",
|
||||||
"no_sse_header": false, // server only
|
"no_sse_header": false, // server only
|
||||||
|
"sc_max_each_post_bytes": 1000000, // packet-up only
|
||||||
"sc_max_buffered_posts": 30, // packet-up, server only
|
"sc_max_buffered_posts": 30, // packet-up, server only
|
||||||
"sc_stream_up_server_secs": "20-80", // stream-up, server only
|
"sc_stream_up_server_secs": "20-80", // stream-up, server only
|
||||||
"x_padding_obfs_mode": false,
|
"x_padding_obfs_mode": false,
|
||||||
|
|||||||
@@ -203,7 +203,7 @@ func checkV2RayXHTTPBaseOptions(mode string, options *V2RayXHTTPBaseOptions) err
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if options.XPaddingBytes.From <= 0 || options.XPaddingBytes.To <= 0 {
|
if options.XPaddingBytes.From <= 0 || options.XPaddingBytes.To <= 0 {
|
||||||
return E.New("xPaddingBytes cannot be disabled")
|
return E.New("x_padding_bytes cannot be disabled")
|
||||||
}
|
}
|
||||||
if options.XPaddingKey == "" {
|
if options.XPaddingKey == "" {
|
||||||
options.XPaddingKey = "x_padding"
|
options.XPaddingKey = "x_padding"
|
||||||
@@ -231,7 +231,7 @@ func checkV2RayXHTTPBaseOptions(mode string, options *V2RayXHTTPBaseOptions) err
|
|||||||
case "body":
|
case "body":
|
||||||
case "cookie", "header":
|
case "cookie", "header":
|
||||||
if mode != "packet-up" {
|
if mode != "packet-up" {
|
||||||
return E.New("UplinkDataPlacement can be " + options.UplinkDataPlacement + " only in packet-up mode")
|
return E.New("uplink_data_placement can be " + options.UplinkDataPlacement + " only in packet-up mode")
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
return E.New("unsupported uplink data placement: " + options.UplinkDataPlacement)
|
return E.New("unsupported uplink data placement: " + options.UplinkDataPlacement)
|
||||||
@@ -241,7 +241,7 @@ func checkV2RayXHTTPBaseOptions(mode string, options *V2RayXHTTPBaseOptions) err
|
|||||||
}
|
}
|
||||||
options.UplinkHTTPMethod = strings.ToUpper(options.UplinkHTTPMethod)
|
options.UplinkHTTPMethod = strings.ToUpper(options.UplinkHTTPMethod)
|
||||||
if options.UplinkHTTPMethod == "GET" && mode != "packet-up" {
|
if options.UplinkHTTPMethod == "GET" && mode != "packet-up" {
|
||||||
return E.New("uplinkHTTPMethod can be GET only in packet-up mode")
|
return E.New("uplink_http_method can be GET only in packet-up mode")
|
||||||
}
|
}
|
||||||
switch options.SessionPlacement {
|
switch options.SessionPlacement {
|
||||||
case "":
|
case "":
|
||||||
@@ -256,7 +256,7 @@ func checkV2RayXHTTPBaseOptions(mode string, options *V2RayXHTTPBaseOptions) err
|
|||||||
case "path":
|
case "path":
|
||||||
case "cookie", "header", "query":
|
case "cookie", "header", "query":
|
||||||
if options.SessionPlacement == "path" {
|
if options.SessionPlacement == "path" {
|
||||||
return E.New("SeqPlacement must be path when SessionPlacement is path")
|
return E.New("seq_placement must be path when session_placement is path")
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
return E.New("unsupported seq placement: " + options.SeqPlacement)
|
return E.New("unsupported seq placement: " + options.SeqPlacement)
|
||||||
@@ -304,7 +304,7 @@ func checkV2RayXHTTPBaseOptions(mode string, options *V2RayXHTTPBaseOptions) err
|
|||||||
options.Xmux.HMaxReusableSecs.From = 1800
|
options.Xmux.HMaxReusableSecs.From = 1800
|
||||||
options.Xmux.HMaxReusableSecs.To = 3000
|
options.Xmux.HMaxReusableSecs.To = 3000
|
||||||
} else if options.Xmux.MaxConnections.To > 0 && options.Xmux.MaxConcurrency.To > 0 {
|
} else if options.Xmux.MaxConnections.To > 0 && options.Xmux.MaxConcurrency.To > 0 {
|
||||||
return E.New("maxConnections cannot be specified together with maxConcurrency")
|
return E.New("max_connections cannot be specified together with max_concurrency")
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user