Fix a bug in bypassing

This commit is contained in:
Max Lv
2018-09-08 11:38:18 +08:00
parent 46ff0a8045
commit 57e74eaa34
+4 -1
View File
@@ -530,7 +530,10 @@ server_handshake(EV_P_ ev_io *w, buffer_t *buf)
goto not_bypass;
}
}
int ip_match = resolved ? acl_match_host(ip) : 0;
int ip_match = (resolved || atyp == SOCKS5_ATYP_IPV4
|| atyp == SOCKS5_ATYP_IPV6) ? acl_match_host(ip) : 0;
switch (get_acl_mode()) {
case BLACK_LIST:
if (ip_match > 0)