mirror of
https://github.com/wangyu-/udp2raw.git
synced 2025-01-19 14:29:34 +08:00
Avoided to add iptables rules with hostname
This commit is contained in:
parent
f7383575b1
commit
675ccdf650
6
misc.cpp
6
misc.cpp
@ -848,15 +848,15 @@ void iptables_rule() // handles -a -g --gen-add --keep-rule --clear --wait-loc
|
||||
{
|
||||
if(raw_mode==mode_faketcp)
|
||||
{
|
||||
sprintf(tmp_pattern,"-s %s/32 -p tcp -m tcp --sport %d",remote_host,remote_port);
|
||||
sprintf(tmp_pattern,"-s %s/32 -p tcp -m tcp --sport %d",my_ntoa(remote_ip_uint32),remote_port);
|
||||
}
|
||||
if(raw_mode==mode_udp)
|
||||
{
|
||||
sprintf(tmp_pattern,"-s %s/32 -p udp -m udp --sport %d",remote_host,remote_port);
|
||||
sprintf(tmp_pattern,"-s %s/32 -p udp -m udp --sport %d",my_ntoa(remote_ip_uint32),remote_port);
|
||||
}
|
||||
if(raw_mode==mode_icmp)
|
||||
{
|
||||
sprintf(tmp_pattern,"-s %s/32 -p icmp",remote_host);
|
||||
sprintf(tmp_pattern,"-s %s/32 -p icmp",my_ntoa(remote_ip_uint32));
|
||||
}
|
||||
pattern=tmp_pattern;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user