mirror of
https://github.com/Lost-MSth/Arcaea-server.git
synced 2026-02-09 01:07:27 +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)
|
conn1, user_id, client_song_map)
|
||||||
|
|
||||||
if error_code == 0:
|
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)
|
value['port'] = int(Config.UDP_PORT)
|
||||||
return jsonify({
|
return jsonify({
|
||||||
"success": True,
|
"success": True,
|
||||||
@@ -749,7 +753,11 @@ def room_join(user_id, room_code):
|
|||||||
conn1, user_id, client_song_map, room_code)
|
conn1, user_id, client_song_map, room_code)
|
||||||
|
|
||||||
if error_code == 0:
|
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)
|
value['port'] = int(Config.UDP_PORT)
|
||||||
return jsonify({
|
return jsonify({
|
||||||
"success": True,
|
"success": True,
|
||||||
@@ -769,7 +777,11 @@ def multiplayer_update(user_id):
|
|||||||
error_code, value = server.arclinkplay.update_room(conn1, user_id, token)
|
error_code, value = server.arclinkplay.update_room(conn1, user_id, token)
|
||||||
|
|
||||||
if error_code == 0:
|
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)
|
value['port'] = int(Config.UDP_PORT)
|
||||||
return jsonify({
|
return jsonify({
|
||||||
"success": True,
|
"success": True,
|
||||||
|
|||||||
@@ -46,6 +46,17 @@ class Config():
|
|||||||
--------------------
|
--------------------
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
'''
|
||||||
|
--------------------
|
||||||
|
联机功能地址,留空则自动获取
|
||||||
|
Link Play address
|
||||||
|
If left blank, it will be obtained automatically.
|
||||||
|
'''
|
||||||
|
LINK_PLAY_HOST = '' # ***.com
|
||||||
|
'''
|
||||||
|
--------------------
|
||||||
|
'''
|
||||||
|
|
||||||
'''
|
'''
|
||||||
--------------------
|
--------------------
|
||||||
SSL证书路径
|
SSL证书路径
|
||||||
|
|||||||
Reference in New Issue
Block a user