do not apply proxy if discard option is set

This commit is contained in:
Baipyrus 2024-09-12 23:17:41 +02:00
parent 7ddc733172
commit b2dda4afbc
2 changed files with 6 additions and 5 deletions

View File

@ -26,8 +26,8 @@ func readArgs(replaceVariable bool, args []string, configCmd string) ([]string,
}
func applyProxy(configArgs []string, configCmd, proxyServer string, variant *util.Variant) ([]string, string) {
// Skip, no proxy provided
if proxyServer == "" {
// Skip, no proxy provided or proxy option discarded
if proxyServer == "" || variant.DiscardProxy {
return configArgs, configCmd
}

View File

@ -18,6 +18,7 @@ type Variant struct {
Arguments []string `json:"args"`
Type VariantType `json:"type,omitempty"`
Equator string `json:"equator,omitempty"`
DiscardProxy bool `json:"discard,omitempty"`
}
type Command struct {