Skip to content

Commit 2784d7a

Browse files
authored
Config: Make defaults consistent with mihomo (#931)
1 parent 75ca7aa commit 2784d7a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clash-lib/src/config/internal/listener.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,22 @@ pub enum InboundOpts {
1616
Socks {
1717
#[serde(flatten)]
1818
common_opts: CommonInboundOpts,
19+
#[serde(default = "default_bool_true")]
1920
udp: bool,
2021
},
2122
#[serde(alias = "mixed")]
2223
Mixed {
2324
#[serde(flatten)]
2425
common_opts: CommonInboundOpts,
26+
#[serde(default = "default_bool_true")]
2527
udp: bool, // TODO users
2628
},
2729
#[cfg(feature = "tproxy")]
2830
#[serde(alias = "tproxy")]
2931
TProxy {
3032
#[serde(flatten)]
3133
common_opts: CommonInboundOpts,
34+
#[serde(default = "default_bool_true")]
3235
udp: bool,
3336
},
3437
#[cfg(feature = "redir")]

0 commit comments

Comments
 (0)