关于Lost-MSth提供的Arcaea-server具体部署方式

NekoNekoNiko120 发布于 2025-01-28 58 次阅读


有不懂的可以使用邮箱联系我

[email protected]

前言

616干的啥必事想必大家都清楚,但是还是想玩arc,或者只是单纯的想玩自制谱,你或许可以试试Arcaea-server

这一切都要感谢Lost-MSth大佬,我犯了不少傻他也很耐心的教我

服务端安装

很简单,只是把文件拉下来后在latest\ version/下执行(注意下载dev分支不是master,master分支较旧)

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ -r requirements.txt

就算安装好了,接着配置config.py(新建一个或者拿config.example.py改),大佬已经写的很清楚了,这里我贴出我的配置

class Config():
    '''
    This is the example setting file.
    The user's setting file's name is `config.py`.
    '''

    '''
    --------------------
    主机的地址和端口号
    Host and port of your server
    '''
    HOST = '0.0.0.0'
    PORT = 82
    '''
    --------------------
    '''

    '''
    --------------------
    游戏API地址前缀
    Game API's URL prefix
    '''
    GAME_API_PREFIX = ["/autumnequinox/33", "/join/21"]
    '''
    --------------------
    '''

    '''
    --------------------
    允许使用的游戏版本,若为空,则默认全部允许
    Allowed game versions
    If it is blank, all are allowed.
    '''
    ALLOW_APPVERSION = []
    '''
    --------------------
    '''

    '''
    --------------------
    联机功能相关设置,请确保与Link Play服务器端的设置一致
    Setting of your link play server
    Please ensure that the settings on the side of Link Play server are consistent.
    '''
    # SET_LINKPLAY_SERVER_AS_SUB_PROCESS: 是否同时在本地启动Link Play服务器
    # SET_LINKPLAY_SERVER_AS_SUB_PROCESS: If it is `True`, the link play server will run with the main server locally at the same time.
    SET_LINKPLAY_SERVER_AS_SUB_PROCESS = True
    # LINKPLAY_HOST: 对主服务器来说的Link Play服务器的地址
    # LINKPLAY_HOST: The address of the linkplay server based on the main server. If it is blank, the link play feature will be disabled.
    LINKPLAY_HOST = '0.0.0.0'
    LINKPLAY_UDP_PORT = 10900
    LINKPLAY_TCP_PORT = 10901
    LINKPLAY_AUTHENTICATION = 'my_link_play_server'
    # LINKPLAY_DISPLAY_HOST: 对客户端来说的Link Play服务器地址,如果为空,则自动获取
    # LINKPLAY_DISPLAY_HOST: The address of the linkplay server based on the client. If it is blank, the host of link play server for the client will be obtained automatically.
    LINKPLAY_DISPLAY_HOST = ''
    '''
    --------------------
    '''

    '''
    --------------------
    SSL证书路径
    留空则使用HTTP
    SSL certificate path
    If left blank, use HTTP.
    '''
    SSL_CERT ='put-your-cert-here'  # *.pem
    SSL_KEY ='put-your-key-here'  # *.key
    '''
    --------------------
    '''

    '''
    --------------------
    愚人节模式开关
    Switch of April Fool's Day
    '''
    IS_APRILFOOLS = True
    '''
    --------------------
    '''

    '''
    --------------------
    世界排名的最大显示数量
    The largest number of global rank
    '''
    WORLD_RANK_MAX = 200
    '''
    --------------------
    '''

    '''
    --------------------
    世界模式当前活动图设置
    Current available maps in world mode
    '''
    AVAILABLE_MAP = []  # Ex. ['test', 'test2']
    '''
    --------------------
    '''

    '''
    --------------------
    Web后台管理页面的用户名和密码
    Username and password of web background management page
    '''
    USERNAME = 'admin'
    PASSWORD = 'password'
    '''
    --------------------
    '''

    '''
    --------------------
    Web后台管理页面的session秘钥,如果不知道是什么,请不要修改
    Session key of web background management page
    If you don't know what it is, please don't modify it.
    '''
    SECRET_KEY = '1145141919810'
    '''
    --------------------
    '''

    '''
    --------------------
    API接口完全控制权限Token,留空则不使用
    API interface full control permission Token
    If you don't want to use it, leave it blank.
    '''
    API_TOKEN = ''
    '''
    --------------------
    '''

    '''
    --------------------
    歌曲下载地址前缀,留空则自动获取
    Song download address prefix
    If left blank, it will be obtained automatically.
    '''
    DOWNLOAD_LINK_PREFIX = ''  # http://***.com/download/
    '''
    --------------------
    '''

    '''
    --------------------
    玩家歌曲下载的24小时次数限制,每个文件算一次
    Player's song download limit times in 24 hours, once per file
    '''
    DOWNLOAD_TIMES_LIMIT = 3000
    '''
    歌曲下载链接的有效时长,单位:秒
    Effective duration of song download link, unit: seconds
    '''
    DOWNLOAD_TIME_GAP_LIMIT = 1000
    '''
    --------------------
    '''

    '''
    --------------------
    Arcaea登录的最大允许设备数量,最小值为1
    The maximum number of devices allowed to log in Arcaea, minimum: 1
    '''
    LOGIN_DEVICE_NUMBER_LIMIT = 3
    '''
    是否允许同设备多应用共存登录
    请注意,这个选项设置为True时,下一个选项将自动变为False
    If logging in from multiple applications on the same device is allowed
    Note that when this option is set to True, the next option automatically becomes False
    '''
    ALLOW_LOGIN_SAME_DEVICE = True
    '''
    24小时内登陆设备数超过最大允许设备数量时,是否自动封号(1天、3天、7天、15天、31天)
    When the number of login devices exceeds the maximum number of devices allowed to log in Arcaea within 24 hours, whether the account will be automatically banned (1 day, 3 days, 7 days, 15 days, 31 days)
    '''
    ALLOW_BAN_MULTIDEVICE_USER_AUTO = False
    '''
    --------------------
    '''

    '''
    --------------------
    是否记录详细的服务器日志
    If recording detailed server logs is enabled
    '''
    ALLOW_INFO_LOG = False
    ALLOW_WARNING_LOG = False
    '''
    --------------------
    '''

    '''
    --------------------
    用户注册时的默认记忆源点数量
    The default amount of memories at the time of user registration
    '''
    DEFAULT_MEMORIES = 0
    '''
    --------------------
    '''

    '''
    --------------------
    数据库更新时,是否采用最新的角色数据,如果你想采用最新的官方角色数据
    注意:如果是,旧的数据将丢失;如果否,某些角色的数据变动将无法同步
    If using the latest character data when updating database. If you want to only keep newest official character data, please set it `True`.
    Note: If `True`, the old data will be lost; If `False`, the data changes of some characters will not be synchronized.
    '''
    UPDATE_WITH_NEW_CHARACTER_DATA = True
    '''
    --------------------
    '''

    '''
    --------------------
    是否全解锁搭档
    If unlocking all partners is enabled
    '''
    CHARACTER_FULL_UNLOCK = True
    '''
    --------------------
    '''

    '''
    --------------------
    是否全解锁世界歌曲
    If unlocking all world songs is enabled
    '''
    WORLD_SONG_FULL_UNLOCK = True
    '''
    --------------------
    '''

    '''
    --------------------
    是否全解锁世界场景
    If unlocking all world sceneries is enabled
    '''
    WORLD_SCENERY_FULL_UNLOCK = True
    '''
    --------------------
    '''

    '''
    --------------------
    是否强制使用全解锁云端存档
    If forcing full unlocked cloud save is enabled
    请注意,当前对于最终结局的判定为固定在`Testify`解锁之前
    Please note that the current setting of the finale state is before the unlock of `Testify`
    '''
    SAVE_FULL_UNLOCK = True
    '''
    --------------------
    '''

然后配置谱面定数,在这里找到谱面定数文件的database,然后用tools/下的update_song.py更新定数文件

接着,启动服务端

python main.py

客户端配置

其实没啥好配置的,但是需要dns劫持/改API地址

dns劫持

(需要解除ssl pin

下载Charles并安装

打开tools-Map Remote,并添加:

from: https://arcapi-v3.lowiro.com/ port443 to https://your-server-domain.com/ port82

然后help-SSL proxying-save Charles ssl root certificate

把这个证书传到手机并安装

如果Charles运行在Mac/Linux,输入

ifconfig | grep inet

如果Charles运行在Windows中,输入

ipconfig

找到inet 192.168开头的,把192开头的输入进shadow rocket或者安卓那边的代理软件(不能用系统代理)模式选http,端口8888

或者使用socks,端口8889

在Charles- proxy settings中,进行如下设置

安装好证书后,现在浏览器打开 https://arcapi-v3.lowiro.com/ 它应该会提示“hello world!”就说明成功了

改API

请联系

[email protected]

什么?你社恐?我也社恐

恭喜

你已经完成了arcaea-server的安装,可以尽情游戏了!
后台配置在https://your-domain.com:82/web
记得开82 10900 10901端口,包括tcp/udp协议