Skip to content

Commit

Permalink
Fix utls fp and encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
problematicconsumer committed Jan 5, 2024
1 parent e4da550 commit 98cd420
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 6 additions & 1 deletion ray2sing/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,19 @@ func getTLSOptions(decoded map[string]string) *option.OutboundTLSOptions {
}
}

fp := decoded["fp"]
if fp == "" {
fp = "chrome"
}

tlsOptions := &option.OutboundTLSOptions{
Enabled: true,
ServerName: serverName,
Insecure: true,
DisableSNI: false,
UTLS: &option.OutboundUTLSOptions{
Enabled: true,
Fingerprint: "chrome",
Fingerprint: fp,
},
ECH: ECHOpts,
}
Expand Down
5 changes: 3 additions & 2 deletions ray2sing/vless.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ func VlessSingbox(vlessURL string) (*T.Outbound, error) {
}
}

xudp := "xudp"
packetEncoding := decoded["packetEncoding"]

return &T.Outbound{
Tag: u.Name,
Type: "vless",
VLESSOptions: T.VLESSOutboundOptions{
ServerOptions: u.GetServerOption(),
UUID: u.Username,
PacketEncoding: &xudp,
PacketEncoding: &packetEncoding,
Flow: decoded["flow"],
TLS: tlsOptions,
Transport: transportOptions,
Expand Down

0 comments on commit 98cd420

Please sign in to comment.