@@ -12,6 +12,7 @@ const Sniffer: React.FC = () => {
12
12
const { sniffer } = controledMihomoConfig || { }
13
13
const {
14
14
'parse-pure-ip' : parsePureIP = true ,
15
+ 'force-dns-mapping' : forceDNSMapping = true ,
15
16
'override-destination' : overrideDestination = false ,
16
17
sniff = {
17
18
HTTP : { ports : [ 80 , 443 ] , 'override-destination' : false } ,
@@ -24,6 +25,7 @@ const Sniffer: React.FC = () => {
24
25
25
26
const [ values , setValues ] = useState ( {
26
27
parsePureIP,
28
+ forceDNSMapping,
27
29
overrideDestination,
28
30
sniff,
29
31
skipDomain,
@@ -74,6 +76,7 @@ const Sniffer: React.FC = () => {
74
76
onSave ( {
75
77
sniffer : {
76
78
'parse-pure-ip' : values . parsePureIP ,
79
+ 'force-dns-mapping' : values . forceDNSMapping ,
77
80
'override-destination' : values . overrideDestination ,
78
81
sniff : values . sniff ,
79
82
'skip-domain' : values . skipDomain ,
@@ -107,7 +110,16 @@ const Sniffer: React.FC = () => {
107
110
} }
108
111
/>
109
112
</ SettingItem >
110
- < SettingItem title = "强制嗅探IP地址" divider >
113
+ < SettingItem title = "对真实IP映射嗅探" divider >
114
+ < Switch
115
+ size = "sm"
116
+ isSelected = { values . forceDNSMapping }
117
+ onValueChange = { ( v ) => {
118
+ setValues ( { ...values , forceDNSMapping : v } )
119
+ } }
120
+ />
121
+ </ SettingItem >
122
+ < SettingItem title = "对未映射IP地址嗅探" divider >
111
123
< Switch
112
124
size = "sm"
113
125
isSelected = { values . parsePureIP }
@@ -116,23 +128,23 @@ const Sniffer: React.FC = () => {
116
128
} }
117
129
/>
118
130
</ SettingItem >
119
- < SettingItem title = "嗅探 HTTP 端口 " divider >
131
+ < SettingItem title = "HTTP 端口嗅探 " divider >
120
132
< Input
121
133
size = "sm"
122
134
className = "w-[50%]"
123
135
value = { values . sniff . HTTP ?. ports . join ( ',' ) }
124
136
onValueChange = { ( v ) => handleSniffPortChange ( 'HTTP' , v ) }
125
137
/>
126
138
</ SettingItem >
127
- < SettingItem title = "嗅探 TLS 端口 " divider >
139
+ < SettingItem title = "TLS 端口嗅探 " divider >
128
140
< Input
129
141
size = "sm"
130
142
className = "w-[50%]"
131
143
value = { values . sniff . TLS ?. ports . join ( ',' ) }
132
144
onValueChange = { ( v ) => handleSniffPortChange ( 'TLS' , v ) }
133
145
/>
134
146
</ SettingItem >
135
- < SettingItem title = "嗅探 QUIC 端口 " divider >
147
+ < SettingItem title = "QUIC 端口嗅探 " divider >
136
148
< Input
137
149
size = "sm"
138
150
className = "w-[50%]"
@@ -141,7 +153,7 @@ const Sniffer: React.FC = () => {
141
153
/>
142
154
</ SettingItem >
143
155
< div className = "flex flex-col items-stretch" >
144
- < h3 className = "select-none" > 跳过嗅探 </ h3 >
156
+ < h3 className = "select-none" > 跳过嗅探域名 </ h3 >
145
157
{ [ ...values . skipDomain , '' ] . map ( ( d , index ) => (
146
158
< div key = { index } className = "flex mt-2" >
147
159
< Input
@@ -167,7 +179,7 @@ const Sniffer: React.FC = () => {
167
179
</ div >
168
180
< Divider className = "my-2" />
169
181
< div className = "flex flex-col items-stretch" >
170
- < h3 className = "select-none mb-2" > 强制嗅探 </ h3 >
182
+ < h3 className = "select-none mb-2" > 强制嗅探域名 </ h3 >
171
183
{ [ ...values . forceDomain , '' ] . map ( ( d , index ) => (
172
184
< div key = { index } className = "flex mb-2" >
173
185
< Input
0 commit comments