mirror of
https://github.com/Lost-MSth/Arcaea-server.git
synced 2025-12-14 08:06:23 +08:00
Fix a bug
Fix a bug about link play not getting the right address. If you use reverse proxy, this may be helpful.
This commit is contained in:
@@ -727,7 +727,11 @@ def room_create(user_id):
|
||||
conn1, user_id, client_song_map)
|
||||
|
||||
if error_code == 0:
|
||||
value['endPoint'] = request.host.split(':')[0]
|
||||
if Config.LINK_PLAY_HOST == '':
|
||||
value['endPoint'] = request.host.split(':')[0]
|
||||
else:
|
||||
value['endPoint'] = Config.LINK_PLAY_HOST
|
||||
|
||||
value['port'] = int(Config.UDP_PORT)
|
||||
return jsonify({
|
||||
"success": True,
|
||||
@@ -749,7 +753,11 @@ def room_join(user_id, room_code):
|
||||
conn1, user_id, client_song_map, room_code)
|
||||
|
||||
if error_code == 0:
|
||||
value['endPoint'] = request.host.split(':')[0]
|
||||
if Config.LINK_PLAY_HOST == '':
|
||||
value['endPoint'] = request.host.split(':')[0]
|
||||
else:
|
||||
value['endPoint'] = Config.LINK_PLAY_HOST
|
||||
|
||||
value['port'] = int(Config.UDP_PORT)
|
||||
return jsonify({
|
||||
"success": True,
|
||||
@@ -769,7 +777,11 @@ def multiplayer_update(user_id):
|
||||
error_code, value = server.arclinkplay.update_room(conn1, user_id, token)
|
||||
|
||||
if error_code == 0:
|
||||
value['endPoint'] = request.host.split(':')[0]
|
||||
if Config.LINK_PLAY_HOST == '':
|
||||
value['endPoint'] = request.host.split(':')[0]
|
||||
else:
|
||||
value['endPoint'] = Config.LINK_PLAY_HOST
|
||||
|
||||
value['port'] = int(Config.UDP_PORT)
|
||||
return jsonify({
|
||||
"success": True,
|
||||
|
||||
@@ -46,6 +46,17 @@ class Config():
|
||||
--------------------
|
||||
'''
|
||||
|
||||
'''
|
||||
--------------------
|
||||
联机功能地址,留空则自动获取
|
||||
Link Play address
|
||||
If left blank, it will be obtained automatically.
|
||||
'''
|
||||
LINK_PLAY_HOST = '' # ***.com
|
||||
'''
|
||||
--------------------
|
||||
'''
|
||||
|
||||
'''
|
||||
--------------------
|
||||
SSL证书路径
|
||||
|
||||
Reference in New Issue
Block a user