|
|
@@ -1556,17 +1556,18 @@ func applyExternalProxyTLSParams(ep map[string]any, params map[string]string, se
|
|
|
// the inbound's own — Hysteria external proxies are typically alternate
|
|
|
// endpoints (port-hop / CDN) fronting the same certificate.
|
|
|
func applyExternalProxyHysteriaParams(ep map[string]any, params map[string]string) {
|
|
|
- pins, ok := externalProxyPins(ep["pinnedPeerCertSha256"])
|
|
|
- if !ok {
|
|
|
- return
|
|
|
- }
|
|
|
- hexPins := make([]string, 0, len(pins))
|
|
|
- for _, p := range pins {
|
|
|
- if s, ok := p.(string); ok {
|
|
|
- hexPins = append(hexPins, hysteriaPinHex(s))
|
|
|
+ if pins, ok := externalProxyPins(ep["pinnedPeerCertSha256"]); ok {
|
|
|
+ hexPins := make([]string, 0, len(pins))
|
|
|
+ for _, p := range pins {
|
|
|
+ if s, ok := p.(string); ok {
|
|
|
+ hexPins = append(hexPins, hysteriaPinHex(s))
|
|
|
+ }
|
|
|
}
|
|
|
+ params["pinSHA256"] = strings.Join(hexPins, ",")
|
|
|
+ }
|
|
|
+ if ai, ok := ep["allowInsecure"].(bool); ok && ai {
|
|
|
+ params["insecure"] = "1"
|
|
|
}
|
|
|
- params["pinSHA256"] = strings.Join(hexPins, ",")
|
|
|
}
|
|
|
|
|
|
// cloneStreamForExternalProxy returns a shallow clone of stream with
|