Skip to content

Commit 7ad5cef

Browse files
fix: removing all dokodemo-door inbounds (#62)
1 parent 405c008 commit 7ad5cef

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

xray.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def to_json(self, **json_kwargs):
3333

3434
def _apply_api(self):
3535
for inbound in self.get('inbounds', []):
36-
if inbound.get('protocol') == 'dokodemo-door':
36+
if inbound.get('protocol') == 'dokodemo-door' and inbound.get('tag') == 'API_INBOUND':
3737
self['inbounds'].remove(inbound)
3838

3939
for rule in self.get('routing', {}).get("rules", []):
@@ -117,7 +117,8 @@ def __init__(self,
117117

118118
def get_version(self):
119119
cmd = [self.executable_path, "version"]
120-
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode('utf-8')
120+
output = subprocess.check_output(
121+
cmd, stderr=subprocess.STDOUT).decode('utf-8')
121122
m = re.match(r'^Xray (\d+\.\d+\.\d+)', output)
122123
if m:
123124
return m.groups()[0]

0 commit comments

Comments
 (0)