Skip to content

Commit

Permalink
fix: accept unsupported protocols in xray config
Browse files Browse the repository at this point in the history
  • Loading branch information
SaintShit committed Aug 19, 2023
1 parent dcdeb04 commit f1777ce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/xray/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from typing import Union

from app.db import GetDB, get_users
from app.models.proxy import ProxySettings
from app.models.proxy import ProxySettings, ProxyTypes
from app.models.user import UserStatus
from app.utils.crypto import get_cert_SANs
from config import DEBUG, XRAY_EXCLUDE_INBOUND_TAGS, XRAY_FALLBACKS_INBOUND_TAG
Expand Down Expand Up @@ -127,6 +127,9 @@ def _validate(self):

def _resolve_inbounds(self):
for inbound in self['inbounds']:
if not inbound['protocol'] in ProxyTypes._value2member_map_:
continue

if inbound['tag'] in XRAY_EXCLUDE_INBOUND_TAGS:
continue

Expand Down

0 comments on commit f1777ce

Please sign in to comment.