haveachin / infrared Goto Github PK
View Code? Open in Web Editor NEWAn ultra lightweight minecraft reverse proxy and idle placeholder
Home Page: https://infrared.dev
License: GNU Affero General Public License v3.0
An ultra lightweight minecraft reverse proxy and idle placeholder
Home Page: https://infrared.dev
License: GNU Affero General Public License v3.0
Can I build on Dedicated Server?
Tanks!!
How difficult would it be to support Geyser? (Minecraft Bedrock / Pocket Edition)
Link: https://geysermc.org/
Thank you! 🌵
Is your feature request related to a problem? Please describe.
inferred dosent support windows 10"
Describe the solution you'd like
Add support for windows 10
Describe alternatives you've considered
Use .exe
Additional context
Docker is not in windows 10
Describe the solution you'd like
It would be useful to have a global config where you can specify what status response should be sent if a client tries to connect to an invalid proxy.
Example/default config:
"invalidProxy": {
"versionName": "infrared",
"protocolNumber": 1,
"motd": "There is no proxy associated with this domain. Please check your configuration."
}
Sorry if I keep making issues but I am wondering if you will ever had a load balancing to this proxy just like NGINX does
Support for something like *.domain.example would be useful in the domainName field. This would allow for sending all requests on a particular subdomain to a separate router. An example of where this might be practical is a multi-box server setup with a raspberry pi/etc acting as a router for different servers.
Hello,
I just wanted to know if there is a way to configure the Grafana panel to show information from all proxies.
Cheers,
Mitch
I don't know if this is already added. If it is please just close this issue. I just wanted to ask, if you could add a way for redirecting the player to different servers depending on his minecraft version. For Example: When I join with my 1.8 instance on my server, which runs 1.16 I will get kicked and If I do the same with my 1.16 instance for a 1.8 server I will get kicked too. Is there a way to automatically redirect 1.8 players to the 1.8 server and 1.16 players to the 1.16 server?
Sincerely yours,
Trqhxrd
Hi,
sadly I can't use the proxy because I always get this error message when trying to connect to the minecraft server:
Could not determine if the container is running error="Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?" connection=xx.x.xx.xxx:51925 destinationAddress=:25566 domainName=xxx.ddns.net event=Error gate=:25565
I made the container using the docker-compose file from this git repo.
Is your feature request related to a problem? Please describe.
Im new to infrared and I dont understand it.
Describe the solution you'd like
Make an tutorial on infrared for windows 10!
Describe alternatives you've considered
A clear explantion and setup guide on infrared
Additional context
I need help how it works on an video tutorial
Hi I noticed that if someone connects to the server using EXAMPLE.COM or Example.com instead of example.com they will not be able to connect to the server. Unless they use example.com
I believe I set it up incorrectly, or I put the config file in the wrong place or I maybe named it the wrong thing?
root@droplet901-12:/# docker start -i infrared
2021/03/15 06:21:57 Loading proxy configs
2021/03/15 06:21:57 Starting Infrared
2021/03/15 06:21:57 Gateway exited; error:no proxies in gateway
It will continue to restart because of this error, unfortunately my google-fu didn't help me with this error either.
Could you make a Tutorial for people with about 5 minutes of docker experience? Thanks!
Hi I have a suggestion and that is to add MySQL support or MongoDB support to add a server so it can be a bit easier to do or some sort of website to add a server if so that would be cool
Hello! The README is a bit ambiguous on the first read-through. It seems, according to the config variables, that Infrared expects there to be a minecraft server running in a Docker container, and that's what the proxy points to. Is that true?
Also, if people would like to contribute, creating a CONTRIBUTING.md file or just putting it in the README would be helpful.
Is it possible to bind only the proxy -> main server to a different ip?
For example, we have a non ddos protected ip and a ddos protected ip and we would like to connect to the backend with the non protected ip, and want players to connect to the proxy through the protected ip. Is this possible?
Im trying to port forward my infrared proxy but dose it have it have an domain for players to connect?
Is there a more elegant way of disabling the Timeout then putting it up an insanley high amount?
Hey,
I recently installed Infrared by using the docker install link in the README.md, and I've been having issues getting the HAProxy IP-forwarding to work & Callbacks.
The issue with the IP Forwarding is when I enable the proxy_protocol in Bungeecord and proxy in Infrared, every time I join I instantly get kicked with no error and just a black kick message. The bungeecord also fails to see me connecting.
The issue with Callback is that when I use the example off of the full config example and enter my own URL, it never receives any POST requests, even when added into the config as shown in the example.
Have you got any idea why this doesn't work?
Thanks,
Nathan
Hello again!
I'm extremely close to having my project, and just need help with one thing.
Is there any chance that you have discord? If you do, please add me, Mitch#0007
Cheers,
Mitch!
I've enabled proxyProtocol
for a server, and on the velocity side proxy-protocol
is enabled, however when connecting I get:
Internal Exception: io.netty.handler.codec.DecoderException: java.io.IOException: Bad packet id 10
on the clientside, and:
2021/03/24 18:48:57 [>] Incoming 192.168.1.1:60116 on listener :25565
2021/03/24 18:48:57 [i] 192.168.1.1:60116 requests proxy with UID velocity1.<domain>@:25565
2021/03/24 18:48:57 [i] 192.168.1.1:60116 with username endigma_ connects through velocity1.<domain>@:25565
2021/03/24 18:48:57 [x] 192.168.1.1:60116 closed connection with :25565
on the infrared proxy. this exact setup works with proxy-protocol enabled in both places, but this is undesirable.
I want to use this proxy, can it restore player IPs so IP bans work?
client will send the server address like mc.example.com.\x00FML\x00
, which is not configureable in config file.
Hi, I recently found out about this project and I was wondering if someone would care to add support for adding this project as an addon to home assistant.
Here's an example on how this could potentially be done.
I would've loved to do this myself, but I have 0 knowledge regarding docker.
If this isn't something anyone is interested in then that's fine as well feel free to close this issue is that's the case.
Please consider adding backwards compatibility for legacy versions of minecraft :)
Hi is there a way to run this without using docker? I am not very good with docker so I would like to know thank you.
Hello,
I would like to know if the infrared has support for the ovh load balancer that defines an output ip different from the client's real ip
Describe the bug
When running the windows 10 86x infrared.exe it closes after an second
To Reproduce
Windows 10
Beta 1.1.1v
I didnt do anything
I ran the exe files
Expected behavior
Run infrared program
Screenshots (Optional)
Additional context (Optional)
Can I get some help?
Hello, is it possible to add support for &
instead of having to use the §
for color codes? As using & would be much easier.
Infrared cant find container, config apears to be correct.
ERR Could not start the container error="no such container"
Every time i try to connect it shows the disconnect message.
Compose:
version: '3.3'
services:
infrared:
image: haveachin/infrared:latest
container_name: "infrared"
restart: "unless-stopped"
stdin_open: true
tty: true
ports:
- "25565:25565/tcp"
volumes:
- "/opt/infrared/configs:/configs"
- "/var/run/docker.sock:/var/run/docker.sock"
expose:
- "25565"
environment:
INFRARED_DEBUG: "true"
INFRARED_COLOR: "false"
INFRARED_CONFIG_PATH: "/configs"
links:
- mcatm6
- mcval3mod
- mcvanilla
config:
DomainName: "mc.example.com"
ProxyTo: ":25566"
Docker:
ContainerName: /mcvanilla
Server:
Version: "1.16.4"
Hello :)
I'm currently using this as DDoS protection for a few servers, my only problem is that there is a bandwidth cap of 750GB per proxy.
I currently have multiple A records as an attempt to spread the load between my proxies, but is quite inefficient as one more usage than the other.
If it were possible to have a TCP connection forwarder that can send the hostname in a header to infrared, that would be amazing! If that is working, I could turn it into a load balancer :)
Thanks,
Mitch, AusGuard.net
Hey, sorry for making another one of these,
I just wanted to know if it would be possible to reload all configs on a set interval?
My current file propagation method deletes the config, and send the updated one. I can't recall if it is the original infrared, or our fork, but we were able to check for changes in a config. With my new system in place, I have to restart every proxy in order to propagate the changes as it is a whole new file, not the same one.
Another thing that would be nice, is if we could check for configs that have been added/removed upon a set interval. This ensures ZERO downtime while players are on the proxy :)
Thanks,
Mitch, AusGuard.net
Ip forwarding on Bungeecord
How can I make the Bungeecord receive the player's ip? I noticed that when a player logs in from bungeecord, he gets the server ip and not the real one.
Thank you! 🌵
Describe the bug
TCPShield Plugin throws an exception when a client joins from a remote network.
To Reproduce
Spin up an Infrared proxy with "realIp": true
and proxy the traffic to a server running TCPShield Plugin 2.5.
In the TCPShield Plugin config set debug-mode: true
and add 127.0.0.1/32
at the bottom of the tcpshield-ips.list
file.
Connect through Infrared to the server from a remote network (the client joining the server must have a valid public IP address). This is important due to how the TCPShield Plugin handles local connection.
You should now be able to see this in the server log:
[TCPShield] Debug : unknown[unknown/null] was disconnected because no proxy info was received and only-allow-proxy-connections is enabled. Raw payload = "example.com///123.4.567.89:12345///1621048346"
Expected behavior
Client should be able to connect to the server and his "real" IP should be passed through.
Additional context (Optional)
TCPShield Plugin 2.5 code that causes the exception:
https://github.com/TCPShield/RealIP/blob/master/src/main/java/net/tcpshield/tcpshield/TCPShieldPacketHandler.java#L106
Infrared stops working with Portainer 1.23.2 and higher
ERR Could not determine if the container is running error="Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?"
Hi, everytime I add a server to infrared it does not instantly update and I have to restart the docker container everytime which is annoying as everyone gets kicked off.
2021-02-23T17:58:13Z INF Unknown address requested connection=someonesip:34458 gate=:25565 requestedAddress=openanarchy.org:25565
OS: Debian 10
The backend server is online as I tested it with an nginx tcp proxy and haproxy and I was able to join the server fine.
I am also using the latest version of infrared.
My suggestion is to add some sort of reload command like nginx.
Is your feature request related to a problem? Please describe.
I love infrared proxy, but sometimes it is "hard" to go and ssh into the server running infrared, and it would be easier if it had a simple WebUI, like Nginx Proxy Manager, but simpler.
Describe the solution you'd like
I would like it if you added a simple WebUi for adding hosts, modifying, and deleting them. Just a simple Add connection → From → To → Save.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Something like this would be more than enough(without access control, and other web-related proxying), also add a tab where you could directly edit the code.
Describe the bug
Hi, I'm having some trouble with my infrared proxy. I have a it like this domain.??.org -> proxy.1b1e.org -> tcpshield.com -> infrared proxy (my end) -> server. But when I turn off the server it should show an offline message but instead it shows
"Can't connect to server" at the MOTD and when trying to connect to the server it says "Disconnected."
To Reproduce
What OS are you using?
Windows_10_infrared_x86_64
{
"domainName": "1b1e.org",
"listenTo": ":25565",
"proxyTo": "XD:25588",
"proxyProtocol": false,
"realIp": true,
"timeout": 1000,
"disconnectMessage": " §b{§3JamesShield§b} \n\n §cSorry {{username}, {{domain}} is offline! \n\n§3Please try again later.",
"offlineStatus": {
"versionName": "§b{§3JamesShield§b}",
"protocolNumber": 1,
"maxPlayers": 0,
"playersOnline": 0,
"motd": "§b{§3JamesShield§b} &cThis server is offline, Please try again later."
}
}
I put the infrared proxy with tcpshield
Expected behavior
Show the offline motd and offline message when connecting
Additional context (Optional)
How do I fix this?
Additional setting for callback URLs according to errors
Callback should be capable of alerting at a specified error level and / or error count
Hi guys i can not run the docker file.
Error at the line 6:
Step 6/14 : RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /main .
---> Running in be20dbc8ce2c
go: github.com/Microsoft/[email protected]: Get "https://proxy.golang.org/github.com/%21microsoft/go-winio/@v/v0.4.14.mod": dial tcp: lookup proxy.golang.org on 1.1.1.1:53: read udp 172.17.0.2:41831->1.1.1.1:53: read: no route to host
The command '/bin/sh -c CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /main .' returned a non-zero code: 1
I suggest you add something similar to this https://www.spigotmc.org/resources/autoreconnect-bungeecord-reconnect.62729/
Sometimes we want to restart the bungeecord, or the server crashes and we don't want players to get disconnected. This plugin solves the problem however it won't work when we restart bungeecord/it crashes. I think this should be added as an optional feature.
Is your feature request related to a problem? Please describe.
I would like the proxy to start the server's docker container when it's offline and someone tries to connect but not turn it off when they disconnect.
Describe the solution you'd like
Add an option under the docker
group along the type of onlyStartup
that would disable shutting the server down by stopping the container, while maintaining the startup functionality.
Describe alternatives you've considered
None.
Additional context
This is would give us the option to stop the server with a plugin or mod which can take more conditions into consideration, like shutting down after no players have been online in 24 hours. This could also be a solution to the server shutting down while players with a direct connection are still online.
I launched Infrared on 5 servers and I think many who use Prometheus + Grafana would find it very useful to see the statistics.
Personally, I need the following data:
When players are trying to connect to the ip instead of the domain name, they are getting disconnected with an error. It would be nice to be able to disable domain checking in the config
The application spams the console with "x did not respond to ping; is the target offline?" when it should know whether or not the target is offline because these servers are managed by infrared's docker functionality?
Useless spam in the logs.
Describe the bug
Portainer configured to use HTTPS connections will drop all HTTP traffic. Infrared tries to connect over HTTP.
To Reproduce
Docker and Portainer configured in the server instance config. Portainer is configured to use SSL. Error:
____:___ closed connection with :25565; error: Get "http://____.com:9000/api/endpoints/1/docker/v1.24/containers/json?all=1&limit=0": context deadline exceeded
Trying this request URL with curl, or trying to visit Portainer over HTTP in general gives the following error:
Client sent an HTTP request to an HTTPS server.
Expected behavior
Automatically redirect to HTTPS when required.
I think the easiest solution would be to allow users to add http:// or https:// to the portainer adress config option, with it defaulting to http if not specified.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.