diff --git a/db_transfer.py b/db_transfer.py index 802c0785e..fe09bd791 100644 --- a/db_transfer.py +++ b/db_transfer.py @@ -640,7 +640,7 @@ def del_server_out_of_bound_safe(self, last_rows, rows): if has_higher_priority: continue - if self.relay_rule_list[id]['dist_ip'] == '0.0.0.0': + if self.relay_rule_list[id]['dist_ip'] == '0.0.0.0' and row['is_multi_user'] == 0: continue temp_relay_rules[id] = self.relay_rule_list[id] @@ -711,7 +711,7 @@ def del_server_out_of_bound_safe(self, last_rows, rows): continue if self.relay_rule_list[id][ - 'dist_ip'] == '0.0.0.0': + 'dist_ip'] == '0.0.0.0' and row['is_multi_user'] == 0: continue temp_relay_rules[id] = self.relay_rule_list[id] diff --git a/shadowsocks/tcprelay.py b/shadowsocks/tcprelay.py index 03445e319..e2a09edd0 100644 --- a/shadowsocks/tcprelay.py +++ b/shadowsocks/tcprelay.py @@ -600,6 +600,9 @@ def _get_mu_relay_host(self, ogn_data): continue if has_higher_priority: + continue + + if self._relay_rules[id]['dist_ip'] == '0.0.0.0': continue if self._relay_rules[id]['port'] == 0: diff --git a/shadowsocks/udprelay.py b/shadowsocks/udprelay.py index f53feb404..d6fd94b41 100644 --- a/shadowsocks/udprelay.py +++ b/shadowsocks/udprelay.py @@ -398,6 +398,9 @@ def _get_mu_relay_host(self, ogn_data, uid): continue if has_higher_priority: + continue + + if self._relay_rules[id]['dist_ip'] == '0.0.0.0': continue if self._relay_rules[id]['port'] == 0: diff --git a/web_transfer.py b/web_transfer.py index 724ae0e09..eb88c95de 100644 --- a/web_transfer.py +++ b/web_transfer.py @@ -430,7 +430,7 @@ def del_server_out_of_bound_safe(self, last_rows, rows): if has_higher_priority: continue - if self.relay_rule_list[id]['dist_ip'] == '0.0.0.0': + if self.relay_rule_list[id]['dist_ip'] == '0.0.0.0' and row['is_multi_user'] == 0: continue temp_relay_rules[id] = self.relay_rule_list[id] @@ -499,7 +499,7 @@ def del_server_out_of_bound_safe(self, last_rows, rows): continue if self.relay_rule_list[id][ - 'dist_ip'] == '0.0.0.0': + 'dist_ip'] == '0.0.0.0' and row['is_multi_user'] == 0: continue temp_relay_rules[id] = self.relay_rule_list[id]