mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-06 01:07:03 +08:00
Fix: should apply default option firstly
This commit is contained in:
@@ -38,9 +38,9 @@ func CreateStack(cfg *Config) (*stack.Stack, error) {
|
|||||||
cfg.PrintFunc = func(string, ...any) {}
|
cfg.PrintFunc = func(string, ...any) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
opts := cfg.Options
|
opts := []option.Option{option.WithDefault()}
|
||||||
if len(opts) == 0 {
|
if len(opts) > 0 {
|
||||||
opts = []option.Option{option.WithDefault()}
|
opts = append(opts, cfg.Options...)
|
||||||
}
|
}
|
||||||
|
|
||||||
s := stack.New(stack.Options{
|
s := stack.New(stack.Options{
|
||||||
|
Reference in New Issue
Block a user