npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

minecraft-proxy

v1.5.0

Published

ProxyPass minecraft

Downloads

55

Readme

Minecraft-ProxyServer

Release Testing

反向代理Minecraft,完整支持Forge,支持正版登录。若后端服务器是Spigot或者Cauldron,可以通过spigot.yml启用bungeecord模式来获取正确的客户端IP

和BungeeCord的区别

minecraft-proxy更像NGINX。 BungeeCord的目标是把多个Minecraft实例用起来像一个,minecraft-proxy的目标是让多个Minecraft实例共享25565端口,就像http应用的虚拟主机。

安装

运行环境

Windows/Linux/macOS

请参阅各平台https://nodejs.org/zh-cn/的安装方法

安装包

Docker

docker run -p 25565:25565 -v ./config:/opt/minecraft-proxy/config bangbang93/minecraft-proxy

国内镜像

docker run -p 25565:25565 -v ./config:/opt/minecraft-proxy/config registry.bangbang93.com/bangbang93/minecraft-proxy

手动编译

git clone [email protected]:bangbang93/minecraft-proxy.git
cd minecraft-proxy
npm ci
npm run build

国内镜像

https://gitlab.bangbang93.com/bangbang93/minecraft-proxy

配置 config.yml

proxy:
  port: 25565 #监听端口
  host: 0.0.0.0 #监听ip
  workers: 0 #worker数量,以便充分利用多核服务器,0代表用上全部核心
defaultServer: localhost #默认服务器,若不想指定,则删除此行
servers:
  - serverName: localhost #服务连接的主机名
    proxyHost: localhost # 后端服务实际ip
    proxyPort: 25565 #后端服务实际端口
    version: 1.8.7 #版本
    handlePing: true #是否接管ping响应
    onlineMode: true
    ping: #接管ping时必填
      maxPlayer: 100 #最大玩家
      description: motd #motd
      favicon: data:image/png;base64, #没有就不用设置
  - serverName: 192.168.193.7
    proxyHost: 192.168.193.1
    proxyPort: 25565
    version: 1.8.7
    handlePing: true
    useProxy: true # 使用PROXY协议,当后端服务是Bungee时,同样启用PROXY协议,可以正确获取客户端IP
blockList:
  ips: #同时会阻拦掉ping请求
    - 114.114.114.114
    - 10.0.0.0/32
  usernames:
    - BadGays
  uuids: # 只有开了正版验证的服务端可以封禁uuid,离线服务器只能用usernames
    - 12b8b9e0eba0ca37e935f037ff1ae90d
profileEndpoint: https://api.mojang.com/profiles/minecraft # 若使用authlib-injector,则将改地址替换为对应的api地址

profileEndpoint地址详见authlib-injector文档

默认服务器: 当未找到对应的服务器主机名时,会连接默认服务器,若无默认服务器,则会断开连接

拆分配置文件

参阅 /config

重载

mcproxy支持无中断重载,通过向master进程发送SIGUSR1信号即可实现

bungeecord模式

找到spigot.yml,修改settings.bungeecord为true,重启服务器即可

Roadmap

  • [ ] 插件机制(WIP)