mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-11-01 15:33:50 +00:00
Remove white list option in CLI
This commit is contained in:
+9
-9
@@ -1402,11 +1402,14 @@ static void accept_cb(EV_P_ ev_io *w, int revents)
|
||||
|
||||
if (acl) {
|
||||
char *peer_name = get_peer_name(serverfd);
|
||||
if (peer_name != NULL && acl_match_host(peer_name)) {
|
||||
if (verbose)
|
||||
LOGI("Access denied from %s", peer_name);
|
||||
close(serverfd);
|
||||
return;
|
||||
if (peer_name != NULL) {
|
||||
if ((get_acl_mode() == BLACK_LIST && acl_match_host(peer_name) == 1)
|
||||
|| (get_acl_mode() == WHITE_LIST && acl_match_host(peer_name) >= 0)) {
|
||||
if (verbose)
|
||||
LOGI("Access denied from %s", peer_name);
|
||||
close(serverfd);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1461,7 +1464,7 @@ int main(int argc, char **argv)
|
||||
|
||||
USE_TTY();
|
||||
|
||||
while ((c = getopt_long(argc, argv, "f:s:p:l:k:t:m:b:c:i:d:a:n:huUvAw6",
|
||||
while ((c = getopt_long(argc, argv, "f:s:p:l:k:t:m:b:c:i:d:a:n:huUvA6",
|
||||
long_options, &option_index)) != -1) {
|
||||
switch (c) {
|
||||
case 0:
|
||||
@@ -1541,9 +1544,6 @@ int main(int argc, char **argv)
|
||||
case 'A':
|
||||
auth = 1;
|
||||
break;
|
||||
case 'w':
|
||||
set_acl_mode(WHITE_LIST);
|
||||
break;
|
||||
case '6':
|
||||
ipv6first = 1;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user