-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 增加 wireguard 出站选项 `resolveStrategy`. * They become a part of you. * 移除不必要的选项别名. * aliases NG. * 微调. --------- Co-authored-by: rui0572 <125641819+rui0572@users.noreply.github.com>
- Loading branch information
Showing
6 changed files
with
175 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package wireguard | ||
|
||
func (c *DeviceConfig) preferIP4() bool { | ||
return c.DomainStrategy == DeviceConfig_FORCE_IP || | ||
c.DomainStrategy == DeviceConfig_FORCE_IP4 || | ||
c.DomainStrategy == DeviceConfig_FORCE_IP46 | ||
} | ||
|
||
func (c *DeviceConfig) preferIP6() bool { | ||
return c.DomainStrategy == DeviceConfig_FORCE_IP || | ||
c.DomainStrategy == DeviceConfig_FORCE_IP6 || | ||
c.DomainStrategy == DeviceConfig_FORCE_IP64 | ||
} | ||
|
||
func (c *DeviceConfig) hasFallback() bool { | ||
return c.DomainStrategy == DeviceConfig_FORCE_IP46 || c.DomainStrategy == DeviceConfig_FORCE_IP64 | ||
} | ||
|
||
func (c *DeviceConfig) fallbackIP4() bool { | ||
return c.DomainStrategy == DeviceConfig_FORCE_IP64 | ||
} | ||
|
||
func (c *DeviceConfig) fallbackIP6() bool { | ||
return c.DomainStrategy == DeviceConfig_FORCE_IP46 | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a109389
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
原讨论链接:#2014