First example
This commit is contained in:
commit
bbc70431ef
|
@ -0,0 +1,3 @@
|
||||||
|
/target
|
||||||
|
Cargo.lock
|
||||||
|
test_server/*
|
|
@ -0,0 +1,9 @@
|
||||||
|
[package]
|
||||||
|
name = "purple_cello_reverse_proxy"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
tokio = { version = "1", features = ["full"] }
|
|
@ -0,0 +1,32 @@
|
||||||
|
// Yeahbut December 2023
|
||||||
|
|
||||||
|
use tokio::io::copy_bidirectional;
|
||||||
|
use tokio::net::{TcpListener, TcpStream};
|
||||||
|
|
||||||
|
use std::env;
|
||||||
|
use std::error::Error;
|
||||||
|
|
||||||
|
#[tokio::main]
|
||||||
|
async fn main() -> Result<(), Box<dyn Error>> {
|
||||||
|
let listen_addr = env::args()
|
||||||
|
.nth(1)
|
||||||
|
.unwrap_or_else(|| "127.0.0.1:25565".to_string());
|
||||||
|
let server_addr = env::args()
|
||||||
|
.nth(2)
|
||||||
|
.unwrap_or_else(|| "127.0.0.1:25566".to_string());
|
||||||
|
|
||||||
|
println!("Listening on: {}", listen_addr);
|
||||||
|
println!("Proxying to: {}", server_addr);
|
||||||
|
|
||||||
|
let listener = TcpListener::bind(listen_addr).await?;
|
||||||
|
|
||||||
|
while let Ok((mut inbound, _)) = listener.accept().await {
|
||||||
|
let mut outbound = TcpStream::connect(server_addr.clone()).await?;
|
||||||
|
|
||||||
|
tokio::spawn(async move {
|
||||||
|
copy_bidirectional(&mut inbound, &mut outbound).await
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
java -Xmx4G -Xms1G -XX:SoftMaxHeapSize=3G -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -jar server_1.19.4.jar --nogui
|
|
@ -0,0 +1,58 @@
|
||||||
|
#Minecraft server properties
|
||||||
|
#Mon Dec 18 15:12:26 MST 2023
|
||||||
|
enable-jmx-monitoring=false
|
||||||
|
rcon.port=25575
|
||||||
|
level-seed=
|
||||||
|
gamemode=creative
|
||||||
|
enable-command-block=false
|
||||||
|
enable-query=false
|
||||||
|
generator-settings={}
|
||||||
|
enforce-secure-profile=true
|
||||||
|
level-name=world
|
||||||
|
motd=A Minecraft Server
|
||||||
|
query.port=25566
|
||||||
|
pvp=true
|
||||||
|
generate-structures=true
|
||||||
|
max-chained-neighbor-updates=1000000
|
||||||
|
difficulty=easy
|
||||||
|
network-compression-threshold=256
|
||||||
|
max-tick-time=60000
|
||||||
|
require-resource-pack=false
|
||||||
|
use-native-transport=true
|
||||||
|
max-players=20
|
||||||
|
online-mode=false
|
||||||
|
enable-status=true
|
||||||
|
allow-flight=false
|
||||||
|
initial-disabled-packs=
|
||||||
|
broadcast-rcon-to-ops=true
|
||||||
|
view-distance=10
|
||||||
|
server-ip=
|
||||||
|
resource-pack-prompt=
|
||||||
|
allow-nether=true
|
||||||
|
server-port=25566
|
||||||
|
enable-rcon=false
|
||||||
|
sync-chunk-writes=true
|
||||||
|
op-permission-level=4
|
||||||
|
prevent-proxy-connections=false
|
||||||
|
hide-online-players=false
|
||||||
|
resource-pack=
|
||||||
|
entity-broadcast-range-percentage=100
|
||||||
|
simulation-distance=10
|
||||||
|
rcon.password=
|
||||||
|
player-idle-timeout=0
|
||||||
|
force-gamemode=false
|
||||||
|
rate-limit=0
|
||||||
|
hardcore=false
|
||||||
|
white-list=false
|
||||||
|
broadcast-console-to-ops=true
|
||||||
|
spawn-npcs=true
|
||||||
|
spawn-animals=true
|
||||||
|
function-permission-level=2
|
||||||
|
initial-enabled-packs=vanilla
|
||||||
|
level-type=minecraft\:normal
|
||||||
|
text-filtering-config=
|
||||||
|
spawn-monsters=false
|
||||||
|
enforce-whitelist=false
|
||||||
|
spawn-protection=16
|
||||||
|
resource-pack-sha1=
|
||||||
|
max-world-size=29999984
|
Loading…
Reference in New Issue