我尝试使用红外线在我的《我的世界》服务器上建立了一个代理

验证环境

    • 自宅鯖 BungeeCord + 各鯖 ポート 25565を開放

 

    vps(ubuntu)1個

在预先设置好的VPS上构建红外设备。

我将参考GitHub上的此链接进行构建。

ufw allow 25565/tcp
mkdir /home/infrared  #infrared用のフォルダの作成
cd /home/infrared 
wget https://github.com/haveachin/infrared/releases/download/v2.0.0-alpha.14/infrared_Linux_x86_64.tar.gz 
tar -zxvf infrared_Linux_x86_64.tar.gz

现在我们完成了引导,接下来是设置。

   # This is an example config for a Minecraft java proxy.
# Feel free to use this as a template for other proxy configs
# or adapt it to your fit your setup.
#
java:
  gateways:
    # This is just the name of this gateway.
    # Since is your only gateways right now I would call it "default".
    # These names ARE global. Make sure to not have duplicates.
    default:
      listeners:
        # Same as the gateway. This is just the name of the listener.
        # Since is binds to port 25565 it makes sense that it is called
        # default for now.
        # These names ARE global. Make sure to not have duplicates.
        # 
        default:
          bind: :25565
          
          # Optional fields:
          # Also look at the defaults.yml file for more optional fields.
          #
          #receiveProxyProtocol: true
          #receiveRealIP: true
  servers:
    # This is again just the name of the server.
    # These names ARE global. Make sure to not have duplicates.
    #
    default:
      # We link this server to our default gateway.
      # That means that players that connect through any listener
      # in our "default" gateway can connect to this server.
      #
      gateways:
        - default
      
      # This is the domain that players enter in their game client.
      # You can have multiple domains here or just one.
      # Currently this holds just a wildcard character as a domain
      # meaning that is accepts every domain that a player uses.
      # Supports '*' and '?' wildcards in the pattern string.
      domains:
        - "*"

      # Address of the server that Infrared sends the players to.
      # 自宅鯖ip:開放port 
      address: 0.0.0.0:25565
      # Optional fields:
      # Also look at the defaults.yml file for more optional fields.
      #
      #proxyBind: 0.0.0.0
      #proxyPass: socks5://127.0.0.1:1080
      #sendProxyProtocol: true
      #sendRealIP: true
      #overrideStatus:
        #versionName: Infrared
        #protocolNumber: 0
        #maxPlayerCount: 0
        #playerCount: 0
        #iconPath: icons/default.png
        #motd: |
        #  Powered by Infrared
        #  §aServer at {{serverDomain}} is online.

请将以下内容翻译成中文:
虽然有许多项目,但只需要更改一个地方,请将以下内容改成您的家用服务器IP地址和已打开的端口。

# Address of the server that Infrared sends the players to.
# 自宅鯖ip:開放port 
address: 0.0.0.0:25565

请把其他细节设定翻译成英文。

保存文件后终其一生

/home/infrared/infrared

如果达到以下状态,启动完成后可以尝试使用 screen 进行管理,或者尝试使用 systemd 进行自动启动,这样可能会更好。

请注意:该文仅涉及红外线设备的构建,且我并非专业的IT工程师,只是出于个人兴趣而从事此项活动,请自行承担个人安全等责任。

广告
将在 10 秒后关闭
bannerAds