mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 09:18:34 +00:00
Add SNI shunt support for Trojan fallbacks
This commit is contained in:
parent
8eed8a0824
commit
99863aa2ac
4 changed files with 129 additions and 61 deletions
|
@ -85,6 +85,7 @@ func (c *TrojanClientConfig) Build() (proto.Message, error) {
|
|||
|
||||
// TrojanInboundFallback is fallback configuration
|
||||
type TrojanInboundFallback struct {
|
||||
Name string `json:"name"`
|
||||
Alpn string `json:"alpn"`
|
||||
Path string `json:"path"`
|
||||
Type string `json:"type"`
|
||||
|
@ -144,6 +145,7 @@ func (c *TrojanServerConfig) Build() (proto.Message, error) {
|
|||
_ = json.Unmarshal(fb.Dest, &s)
|
||||
}
|
||||
config.Fallbacks = append(config.Fallbacks, &trojan.Fallback{
|
||||
Name: fb.Name,
|
||||
Alpn: fb.Alpn,
|
||||
Path: fb.Path,
|
||||
Type: fb.Type,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue