mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-07-21 06:43:30 +03:00
Add admin panel, manager, node_manager, bandwidth limiter, connection limiter, bonding, failover, vless encryption, mkcp transport
This commit is contained in:
@@ -265,3 +265,14 @@ func DupContext(ctx context.Context) context.Context {
|
||||
}
|
||||
return log.ContextWithID(context.Background(), id)
|
||||
}
|
||||
|
||||
func HWIDContext(ctx context.Context, headers http.Header) context.Context {
|
||||
for key, values := range headers {
|
||||
if strings.ToLower(key) == "x-hwid" {
|
||||
if len(values) != 0 {
|
||||
return context.WithValue(ctx, "hwid", values[0])
|
||||
}
|
||||
}
|
||||
}
|
||||
return ctx
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user