Files
omv-dijiang/works/patch/option/obfhttp.go.patch
T
2026-04-25 09:04:39 +08:00

39 lines
1.3 KiB
Diff

--- /dev/null
+++ b/option/obfhttp.go
@@ -0,0 +1,35 @@
+// OMV
+package option
+
+import (
+ "github.com/sagernet/sing/common/auth"
+ "github.com/sagernet/sing/common/json/badoption"
+)
+
+type ObfHTTPInboundOptions struct {
+ ListenOptions
+ InboundTLSOptionsContainer
+ Users []auth.User `json:"users,omitempty"`
+ Path string `json:"path,omitempty"`
+ Encoding string `json:"encoding,omitempty"`
+ Encryption *ObfHTTPEncryption `json:"encryption,omitempty"`
+ SessionTimeout badoption.Duration `json:"session_timeout,omitempty"`
+ LongPollTimeout badoption.Duration `json:"long_poll_timeout,omitempty"`
+}
+
+type ObfHTTPOutboundOptions struct {
+ DialerOptions
+ ServerOptions
+ OutboundTLSOptionsContainer
+ Username string `json:"username,omitempty"`
+ Password string `json:"password,omitempty"`
+ Path string `json:"path,omitempty"`
+ Encoding string `json:"encoding,omitempty"`
+ Encryption *ObfHTTPEncryption `json:"encryption,omitempty"`
+ LongPollTimeout badoption.Duration `json:"long_poll_timeout,omitempty"`
+}
+
+type ObfHTTPEncryption struct {
+ Method string `json:"method"`
+ Password string `json:"password"`
+}