This commit is contained in:
evilsocket 2018-02-08 02:11:46 +01:00
commit a2425e7cff

View file

@ -58,10 +58,13 @@ func (f WindowsFirewall) generateRule(r *Redirection, enabled bool) []string {
}
if enabled == true {
rule = append(rule, fmt.Sprintf("protocol=%s", r.Protocol))
rule = append(rule, fmt.Sprintf("connectport=%d", r.SrcPort))
if r.SrcAddress != "" {
rule = append(rule, fmt.Sprintf("connectaddress=%s", r.SrcAddress))
} else {
rule = append(rule, "connectaddress=0.0.0.0")
}
}