Skip to content

Commit

Permalink
fix: maxUploadSize default value
Browse files Browse the repository at this point in the history
  • Loading branch information
M03ED committed Jul 3, 2024
1 parent e22bf9b commit 554233a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions app/subscription/v2ray.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def add(self, remark: str, address: str, inbound: dict, settings: dict):
ais=inbound.get("ais", ""),
fs=inbound.get("fragment_setting", ""),
multiMode=multi_mode,
max_upload_size=inbound.get('max_upload_size', 1),
max_upload_size=inbound.get('max_upload_size', 1000000),
max_concurrent_uploads=inbound.get('max_concurrent_uploads', 10),
)

Expand All @@ -82,7 +82,7 @@ def add(self, remark: str, address: str, inbound: dict, settings: dict):
ais=inbound.get("ais", ""),
fs=inbound.get("fragment_setting", ""),
multiMode=multi_mode,
max_upload_size=inbound.get('max_upload_size', 1),
max_upload_size=inbound.get('max_upload_size', 1000000),
max_concurrent_uploads=inbound.get('max_concurrent_uploads', 10),
)

Expand All @@ -107,7 +107,7 @@ def add(self, remark: str, address: str, inbound: dict, settings: dict):
ais=inbound.get("ais", ""),
fs=inbound.get("fragment_setting", ""),
multiMode=multi_mode,
max_upload_size=inbound.get('max_upload_size', 1),
max_upload_size=inbound.get('max_upload_size', 1000000),
max_concurrent_uploads=inbound.get('max_concurrent_uploads', 10),
)

Expand Down Expand Up @@ -143,7 +143,7 @@ def vmess(
ais="",
fs="",
multiMode: bool = False,
max_upload_size: int = 1,
max_upload_size: int = 1000000,
max_concurrent_uploads: int = 10,
):
payload = {
Expand Down Expand Up @@ -218,7 +218,7 @@ def vless(cls,
ais='',
fs="",
multiMode: bool = False,
max_upload_size: int = 1,
max_upload_size: int = 1000000,
max_concurrent_uploads: int = 10,
):

Expand Down Expand Up @@ -294,7 +294,7 @@ def trojan(cls,
ais='',
fs="",
multiMode: bool = False,
max_upload_size: int = 1,
max_upload_size: int = 1000000,
max_concurrent_uploads: int = 10,
):

Expand Down Expand Up @@ -448,7 +448,7 @@ def httpupgrade_config(self, path=None, host=None, random_user_agent=None):
return httpupgradeSettings

def splithttp_config(self, path=None, host=None, random_user_agent=None,
max_upload_size: int = 1,
max_upload_size: int = 1000000,
max_concurrent_uploads: int = 10,
):

Expand Down Expand Up @@ -837,7 +837,7 @@ def add(self, remark: str, address: str, inbound: dict, settings: dict):
dialer_proxy=dialer_proxy,
multiMode=multi_mode,
random_user_agent=inbound.get('random_user_agent', False),
max_upload_size=inbound.get('max_upload_size', 1),
max_upload_size=inbound.get('max_upload_size', 1000000),
max_concurrent_uploads=inbound.get('max_concurrent_uploads', 10),
)

Expand Down
2 changes: 1 addition & 1 deletion app/xray/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def _resolve_inbounds(self):
settings['path'] = net_settings.get('path', '')
host = net_settings.get('host', '')
settings['host'] = [host]
settings['maxUploadSize'] = net_settings.get('maxUploadSize', 1)
settings['maxUploadSize'] = net_settings.get('maxUploadSize', 1000000)
settings['maxConcurrentUploads'] = net_settings.get('maxConcurrentUploads', 10)

else:
Expand Down

0 comments on commit 554233a

Please sign in to comment.