mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-06-08 03:34:13 +08:00
27 lines
1.1 KiB
Go
27 lines
1.1 KiB
Go
package option
|
|
|
|
import (
|
|
"github.com/sagernet/sing/common/json/badoption"
|
|
)
|
|
|
|
type MITMOptions struct {
|
|
Enabled bool `json:"enabled,omitempty"`
|
|
// HTTP2Enabled bool `json:"http2_enabled,omitempty"`
|
|
TLSDecryptionOptions *TLSDecryptionOptions `json:"tls_decryption,omitempty"`
|
|
}
|
|
|
|
type TLSDecryptionOptions struct {
|
|
Enabled bool `json:"enabled,omitempty"`
|
|
KeyPair string `json:"key_pair_p12,omitempty"`
|
|
KeyPassword string `json:"key_password,omitempty"`
|
|
}
|
|
|
|
type MITMRouteOptions struct {
|
|
Enabled bool `json:"enabled,omitempty"`
|
|
Script badoption.Listable[string] `json:"script,omitempty"`
|
|
SurgeURLRewrite badoption.Listable[SurgeURLRewriteLine] `json:"sg_url_rewrite,omitempty"`
|
|
SurgeHeaderRewrite badoption.Listable[SurgeHeaderRewriteLine] `json:"sg_header_rewrite,omitempty"`
|
|
SurgeBodyRewrite badoption.Listable[SurgeBodyRewriteLine] `json:"sg_body_rewrite,omitempty"`
|
|
SurgeMapLocal badoption.Listable[SurgeMapLocalLine] `json:"sg_map_local,omitempty"`
|
|
}
|