fix probe resistance
This commit is contained in:
@ -7,16 +7,16 @@ import (
|
||||
)
|
||||
|
||||
type metadata struct {
|
||||
proxyAgent string
|
||||
probeResist *probeResist
|
||||
sni bool
|
||||
enableUDP bool
|
||||
proxyAgent string
|
||||
probeResistance *probeResistance
|
||||
sni bool
|
||||
enableUDP bool
|
||||
}
|
||||
|
||||
func (h *http2Handler) parseMetadata(md mdata.Metadata) error {
|
||||
const (
|
||||
proxyAgent = "proxyAgent"
|
||||
probeResistKey = "probeResist"
|
||||
probeResistKey = "probeResistance"
|
||||
knock = "knock"
|
||||
sni = "sni"
|
||||
enableUDP = "udp"
|
||||
@ -26,7 +26,7 @@ func (h *http2Handler) parseMetadata(md mdata.Metadata) error {
|
||||
|
||||
if v := mdata.GetString(md, probeResistKey); v != "" {
|
||||
if ss := strings.SplitN(v, ":", 2); len(ss) == 2 {
|
||||
h.md.probeResist = &probeResist{
|
||||
h.md.probeResistance = &probeResistance{
|
||||
Type: ss[0],
|
||||
Value: ss[1],
|
||||
Knock: mdata.GetString(md, knock),
|
||||
@ -39,7 +39,7 @@ func (h *http2Handler) parseMetadata(md mdata.Metadata) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
type probeResist struct {
|
||||
type probeResistance struct {
|
||||
Type string
|
||||
Value string
|
||||
Knock string
|
||||
|
Reference in New Issue
Block a user