Giter VIP home page Giter VIP logo

zbproxy's Introduction

ZBProxy

FOSSA Status Go Reference Go Report Card

English | 简体中文

🚀 A simple, fast, high performance multipurpose TCP relay, primarily developed for building Hypixel reverse proxies.

Feature Highlights

  • ☝ One click to go
  • 📋 Highly customizable configuration
  • 🔌 TCP zero-copy relay on Linux with splice(2), and 2 more relay modes
  • 👮 Whitelist/Blacklist for IP and Minecraft player name (Access Control)
  • 🔄 Configuration hot reload for lists and Minecraft MOTD
  • 📦 Tailored high performance and lightweight Minecraft network protocol framework
  • 💻 Clean and colorful log outputs, easy to track every connection
  • 🔮 Multiple platforms and architectures
  • And more...

What can it do?

In many situations you can use Nginx proxy_pass to easy relay your Minecraft data.
The complete code is as follows:

stream {
    server {
        listen 25565;
        proxy_pass TARGET_SERVER_ADDRESS;
    }
}

But start from 2020, Hypixel set up an authentication of the player login address.
If you do not log in from their official address as known as mc.hypixel.net:25565, you will not be able to join the game.
The original method is to cheat the server by modifying the hosts file.
But that's too complicated for people who don't know the principle.
We studied its working principle, and successfully bypassed the detection by modifying the data sent by client at the technical level.
The product of the research is what you see now as ZBProxy.
For players, just enter the address of your proxy server, you can join the game directly as usual.

Is it safe?

There is no need to worry about privacy at all, because the connection to any Minecraft server which requires online verification is fully encrypted.
Our code is completely open source, so you can freely check whether there is a backdoor.

How to use it?

  1. Download the compiled executable file at Actions page. Login required.
  2. Run it, and your relay service is now established!
    For Linux system, you may need to give permissions to the executable file in order to solve problems that cannot run or run blocked. Just enter the following command:
chmod +x PATH_TO_THE_FILE
  1. Ensure the port 25565 is fully open on the server.
  2. Enter your proxy server IP into your Minecraft client, and join it for game!
    (Since the listening port is 25565, you don't need to input the port number in the client, and the client will complete it automatically)

Since ZBProxy 3.0, users are allowed to set the listening port and forwarding destination through the automatically generated JSON configuration file, including choosing whether to enable the hostname rewriting function and a series of surprise functions.
At the first startup, a JSON configuration file is automatically generated, which contains a preset Hypixel forwarding configuration, so users can still build forwarding services in only one step like old versions, but reasonable use of the configuration file can help users explore more possibilities of ZBProxy. Including but not limited to quickly setting up an ordinary and efficient reverse proxy.
If you are just new in here, you can view the ZBProxy Document to learn about how to unlock the power of ZBProxy through configuration.

Are there any other ways to improve my games?

Generally speaking, Linux-based operating environments have more room for optimization.
ZBProxy supports Zero Copy technology on Linux, which can reduce memory usage by one time, save a lot of CPU processing, and reduce network latency. When users set Flow to auto or linux-zerocopy on their Service configuration, this technology will be automatically adopted in due course.
If you are running ZBProxy on a Linux-based system, you can go to ZBProxy Document to view tips for optimizing network settings.

TODO List

  1. Some functions are still not implemented.

Sponsor

JetBrains logo
JetBrains for open source support development license.

License

FOSSA Status

zbproxy's People

Contributors

alxe1621 avatar dependabot[bot] avatar fossabot avatar layou233 avatar lycorisor avatar moorefoss avatar oopsgary avatar thrrip avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

zbproxy's Issues

FML signature in hostname

FML clients always add " FML" in the end of hostname in handshake packet, while ZBProxy ignored this when hostname rewritten is enabled, which causes players unable to join the game if remote server is a FML server.
This bug will not influence vanilla servers like Hypixel, but also need to fix.
7a0e2fcec17c1d46.png

配置文件动态加载不正常

如下配置内容

{
  "Services": [
    {
      "Name": "XiaoSpeed-Hypixel",
      "TargetAddress": "mc.hypixel.net",
      "TargetPort": 25565,
      "Listen": 25565,
      "Flow": "multiple",
      "IPAccess": {
        "Mode": ""
      },
      "Minecraft": {
        "EnableHostnameRewrite": true,
        "OnlineCount": {
          "Max": 2022,
          "Online": -1,
          "EnableMaxLimit": false
        },
        "IgnoreFMLSuffix": true,
        "NameAccess": {
          "Mode": "allow",
          "ListTags": ["username"]
        },
        "AnyDestSettings": {},
        "MotdFavicon": "{DEFAULT_MOTD}",
        "MotdDescription": "§d小蝌蚪的加速IP!§9 XiaoSpeed-Hypixel §e Link Start! \n        §6Kurun加速线路"
      },
      "TLSSniffing": {
        "RejectNonTLS": false
      },
      "Outbound": {
        "Type": ""
      }
    },
    {
      "Name": "XiaoSpeed-Mcci",
      "TargetAddress": "play.mccisland.net",
      "TargetPort": 25565,
      "Listen": 25564,
      "Flow": "multiple",
      "IPAccess": {
        "Mode": ""
      },
      "Minecraft": {
        "EnableHostnameRewrite": true,
        "OnlineCount": {
          "Max": 2022,
          "Online": -1,
          "EnableMaxLimit": false
        },
        "IgnoreFMLSuffix": true,
        "NameAccess": {
          "Mode": "allow",
          "ListTags": ["username"]
        },
        "AnyDestSettings": {},
        "MotdFavicon": "{DEFAULT_MOTD}",
        "MotdDescription": "§d小蝌蚪的加速IP!§9 XiaoSpeed-Mcci §e Link Start! \n         §6Kurun加速线路"
      },
      "TLSSniffing": {
        "RejectNonTLS": false
      },
      "Outbound": {
        "Type": ""
      }
    }
  ],
  "Lists": {}
}
  • 如果使用热重载,则会出现报错

  • 如果使用冷重载,则可以正常使用

无法构建

github.com/layou233/ZBProxy/service/transfer
service/transfer/options.go:15:33: undefined: atomic.Int32
以上是使用go build main.go构建后返回的信息
我猜测是我修改了源码的问题,于是使用了未经过修改的源码进行构建,却依旧如此。

无法连接

image
错误1

image
错误2

服务器端口出入均放行,系统是CentOS 7.6

hyp连接超时

默认配置 已放行25565端口

在多人游戏列表可正常显示服务器状态

image
image

玩家Logs文件中出现Unexpected packet during modded negotiation - assuming vanilla or keepalives:(这个包的名字)的错误

先附上一段Log:
[18:18:19] [Netty Client IO #6/INFO]: Unexpected packet during modded negotiation - assuming vanilla or keepalives : net.minecraft.network.play.server.S37PacketStatistics
[18:18:19] [Netty Client IO #6/INFO]: Unexpected packet during modded negotiation - assuming vanilla or keepalives : net.minecraft.network.play.server.S05PacketSpawnPosition
[18:18:19] [Netty Client IO #6/INFO]: Unexpected packet during modded negotiation - assuming vanilla or keepalives : net.minecraft.network.play.server.S39PacketPlayerAbilities
[18:18:19] [Netty Client IO #6/INFO]: Unexpected packet during modded negotiation - assuming vanilla or keepalives : net.minecraft.network.play.server.S09PacketHeldItemChange
[18:18:19] [Netty Client IO #6/INFO]: Unexpected packet during modded negotiation - assuming vanilla or keepalives : net.minecraft.network.play.server.S3EPacketTeams
[18:18:19] [Netty Client IO #6/INFO]: Unexpected packet during modded negotiation - assuming vanilla or keepalives : net.minecraft.network.play.server.S3EPacketTeams
[18:18:19] [Netty Client IO #6/INFO]: Unexpected packet during modded negotiation - assuming vanilla or keepalives : net.minecraft.network.play.server.S3EPacketTeams
[18:18:19] [Netty Client IO #6/INFO]: Unexpected packet during modded negotiation - assuming vanilla or keepalives : net.minecraft.network.play.server.S3EPacketTeams
[18:18:19] [Netty Client IO #6/INFO]: Unexpected packet during modded negotiation - assuming vanilla or keepalives : net.minecraft.network.play.server.S3EPacketTeams
[18:18:19] [Netty Client IO #6/INFO]: Unexpected packet during modded negotiation - assuming vanilla or keepalives : net.minecraft.network.play.server.S3EPacketTeams
[18:18:19] [Netty Client IO #6/INFO]: Unexpected packet during modded negotiation - assuming vanilla or keepalives : net.minecraft.network.play.server.S3EPacketTeams
[18:18:19] [Netty Client IO #6/INFO]: Unexpected packet during modded negotiation - assuming vanilla or keepalives : net.minecraft.network.play.server.S3EPacketTeams
[18:18:19] [Netty Client IO #6/INFO]: Unexpected packet during modded negotiation - assuming vanilla or keepalives : net.minecraft.network.play.server.S3EPacketTeams
[18:18:19] [Netty Client IO #6/INFO]: Unexpected packet during modded negotiation - assuming vanilla or keepalives : net.minecraft.network.play.server.S3EPacketTeams
[18:18:19] [Netty Client IO #6/INFO]: Unexpected packet during modded negotiation - assuming vanilla or keepalives : net.minecraft.network.play.server.S3EPacketTeams
[18:18:19] [Netty Client IO #6/INFO]: Unexpected packet during modded negotiation - assuming vanilla or keepalives : net.minecraft.network.play.server.S3EPacketTeams
[18:18:19] [Netty Client IO #6/INFO]: Unexpected packet during modded negotiation - assuming vanilla or keepalives : net.minecraft.network.play.server.S3EPacketTeams
[18:18:19] [Netty Client IO #6/INFO]: Unexpected packet during modded negotiation - assuming vanilla or keepalives : net.minecraft.network.play.server.S3EPacketTeams
[18:18:19] [Netty Client IO #6/INFO]: Unexpected packet during modded negotiation - assuming vanilla or keepalives : net.minecraft.network.play.server.S3EPacketTeams
[18:18:19] [Netty Client IO #6/INFO]: Unexpected packet during modded negotiation - assuming vanilla or keepalives : net.minecraft.network.play.server.S3EPacketTeams
[18:18:19] [Netty Client IO #6/INFO]: Unexpected packet during modded negotiation - assuming vanilla or keepalives : net.minecraft.network.play.server.S3EPacketTeams
[18:18:19] [Netty Client IO #6/INFO]: Unexpected packet during modded negotiation - assuming vanilla or keepalives : net.minecraft.network.play.server.S3EPacketTeams
[18:18:19] [Netty Client IO #6/INFO]: Unexpected packet during modded negotiation - assuming vanilla or keepalives : net.minecraft.network.play.server.S3EPacketTeams
[18:18:19] [Netty Client IO #6/INFO]: Unexpected packet during modded negotiation - assuming vanilla or keepalives : net.minecraft.network.play.server.S3EPacketTeams
[18:18:19] [Netty Client IO #6/INFO]: Unexpected packet during modded negotiation - assuming vanilla or keepalives : net.minecraft.network.play.server.S3EPacketTeams
[18:18:19] [Netty Client IO #6/INFO]: Unexpected packet during modded negotiation - assuming vanilla or keepalives : net.minecraft.network.play.server.S3EPacketTeams
[18:18:19] [Netty Client IO #6/INFO]: Unexpected packet during modded negotiation - assuming vanilla or keepalives : net.minecraft.network.play.server.S3EPacketTeams

这个bug进了服务器就会有
玩久之后log文件超级大(几百mb)
client收到啥包都报错

我用的forge版本为11.15.1.1722 Minecraft版本为1.8.9

无法使用SRV解析

该程序貌似无法使用SRV解析,是否是程序的问题呢?同样的端口情况下,MC服务端的SRV会生效

有虫

在使用1.17.1进行连接时,会导致zbproxy直接崩溃,这是一个很奇怪的bug

关于添加BAC_HWID封禁功能

考虑到一旦有人作弊将会导致损失一个IP并使使用同一个线路的人账户被封,所以建议兼容BAC(Badlion Anti Cheat),这样ZBProxy一旦有玩家被目标服务器如Hypixel封禁就可以封锁作弊者HWID!

能不能添加控制台命令支持?

能否在控制台中实现通过指令修改部分配置文件内容
如:
whitelist add <Player> 添加玩家白名单
whitelist del <Player> 删除玩家白名单
list 输出当前使用该节点的玩家消息和IP

添加延迟自定义文字

新功能建议

添加延迟自定义文字

  • 当我在使用其他付费加速ip时,看的其延迟被改成下图这样
  • 当我把鼠标放在玩家栏的位置时,会出现文字
所有我想知道这是怎么实现的,或者能在ZBProxy否实现. (应该能实现,别人已经做出来了)

如何热加载配置文件

我更改配置文件List中的某一项后,等了差不多一个多小时,后台都没看到有重载的提示,并且测试后也没有添加成功白名单

如何修改hosts文件以绕过Hypixel非官方地址检测?

增加配置文件热重载

每一次添加新的Lists Object都需要重新启动ZBProxy,是否可以提供一种手段或者定时热重载配置文件?

MOTD图片怎么改

"MotdFavicon": "{DEFAULT_MOTD}"
这是默认MOTD,我不明白这里面应该填什么?填写图片路径?还是图片名称?
MotdFavicon : ""

如何使ZBProxy加速MCC并正常加入游戏?

MCC早时接入了Anycast,但是泛播对于某些地区来说并没有降低延迟,于是使用了ZBProxy并成功加速游戏,然后最近MCC禁止了通过VPN/Proxy连接的玩家加入,一但加入,就会显示这些(如图)。
所以如何使ZBProxy加速MCC并正常加入游戏?
-4e2877cb7ed1639b

增加域名检测

通过检测玩家进入时的域名与config中的域名来过滤一部分恶意流量

可以写一个白名单吗

建议配置文件使用yml格式,让用户可以选择开启与否,还可以选择sqlite或者mysql(SQL Server对于Linux不太友好,所以不建议做),希望大佬能加上这个功能(我不太会说话qwq可能有点唐突了)

怎么使用

我目前已执行启动文件,无法直击链接
-系统 centos7
-客户端 badlion

出现了奇怪的问题

goroutine 862 [running]:
main.transfer({0x6b77e0, 0xc00000e010}, {0x6b77e0, 0xc00000e0f0}, 0x1000, 0x1)
/home/runner/work/ZBProxy/ZBProxy/transfer.go:70 +0x815
created by main.forDial
/home/runner/work/ZBProxy/ZBProxy/transfer.go:26 +0x231
这个问题非常常见

actions download

layou我无法在actions下载了,他他他,过期了!!!!!!!!

关于socks

我看这里面好像还写了通过socks代理,请问目前是否可用。

功能建议:添加ForceHost

ForceHost字段方便修改servername,比如说我给TargetAddress填写了1.2.3.4,但是发送服务器地址时如果存在ForceHost字段,那么就把服务器地址修改成ForceHost字段填写的内容,这样子方便IPBan了以后使用端口转发技术让其他服务器转发hypixel的流量以便更换IP绕过IPBan

无法启动

ZBProxy 3.0-rc.2 | Running...� ______ _____ _____ _____ _____ __ __ __ __ |___ / | _ \ | _ \ | _ \ / _ \ \ \ / / \ \ / / / / | || | | || | | || | | | | | \ / / \ / / / / | _ { | / | _ / | | | | } { \ / / / | || | | | | | \ \ | || | / /\ \ / / /| |/ || || _\ ___/ // _\ // Welcome to ZBProxy 3.0-rc.2! Build Information: go1.19, linux/amd64 2022/08/31 19:12:07 Successfully loaded config from file. 2022/08/31 19:12:07 Config Reload Error : no such file or directory

无法启用访问控制功能

配置文件如下

{
    "Services": [
        {
            "Name": "PorxyTest",
            "TargetAddress": "mc.hypixel.net",
            "TargetPort": 25565,
            "Listen": 25565,
            "Flow": "linux-zerocopy",
            "IPAccess": {
                "Mode": ""
            },
            "Minecraft": {
                "EnableHostnameRewrite": true,
                "OnlineCount": {
                    "Max": 2023,
                    "Online": -1,
                    "EnableMaxLimit": false
                },
                "NameAccess": {
                    "Mode": "block",
                    "ListTags": ["names"]
                },
                "AnyDestSettings": {},
                "PingMode": "",
                "MotdFavicon": "icon.png",
                "MotdDescription": "Proxy"
            },
            "TLSSniffing": {
                "RejectNonTLS": false
            },
            "Outbound": {
                "Type": ""
            }
        }
    ],
    "Lists": {
        "names": ["123", "BotAli"],
        "iPs": ["1.1.1.1", "2.2.2.2"]
    }
}

求助:获取不到在线玩家数

服务器上有一个玩家但是游戏界面显示 0/2023
{
"Services": [
{
"Name": "",
"TargetAddress": "
***",
"TargetPort": *****,
"Listen": ,
"Flow": "linux-zerocopy",
"IPAccess": {
"Mode": "",
"ListTags": []
},
"Minecraft": {
"EnableHostnameRewrite": false,
"RewrittenHostname": "",
"OnlineCount": {
"Max": 2023,
"Online": -1,
"EnableMaxLimit": false
},
"IgnoreFMLSuffix": false,
"NameAccess": {
"Mode": "",
"ListTags": []
},
"EnableAnyDest": false,
"AnyDestSettings": {},
"PingMode": "",
"MotdFavicon": "",
"MotdDescription": "
"
},
"TLSSniffing": {
"RejectNonTLS": false,
"RejectIfNonMatch": false,
"SNIAllowListTags": []
},
"Outbound": {
"Type": "",
"Network": "tcp",
"Address": ""
}
}
],
"Lists": {}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.