stevenarella/src
ice_iix 938905068b Add command-line option to change default protocol version
Previously, we would send the latest supported protocol version in the
server ping packet. This normally works fine since the server will
respond with the protocol version it supports, which we'll use. However,
some server software such as BungeeCord supports _multiple_ protocols,
and the server will match what the client sent in the ping (if it
supports it). Since BungeeCord is a proxy, it forwards to backend
servers which can be of various versions, which won't necessarily be the
latest.

This change adds a command-line option to change the "default" protocol
version, -p or --default-protocol-version, which is used in the ping
packet instead. Current default is 477 (1.14), but if you pass for
example -p 404 (1.13.2), then BungeeCord will respond accordingly:

packet = Some(StatusResponse(StatusResponse { status: "{\"version\":{\"name\":\"BungeeCord 1.8.x-1.14.x\",\"protocol\":404},\"players\":{\"max\":1,\"online\":0},\"description\":{\"extra\":[{\"color\":\"dark_blue\",\"text\":\"Another Bungee server\"}],\"text\":\"\"},\"modinfo\":{\"type\":\"FML\",\"modList\":[]}}" }))

[main.rs:95][INFO] Detected server protocol version 404

and this protocol will be used. Effectively, this option lets you
masquerade as any supported client version.

See https://github.com/iceiix/stevenarella/issues/125#issuecomment-489484701
2019-05-06 16:00:01 -07:00
..
console Use field init shorthand, instead of x:x, just x, 2018-11-04 13:43:30 -08:00
ecs Use field init shorthand, instead of x:x, just x, 2018-11-04 13:43:30 -08:00
entity Add double-jump to toggle creative flight. Closes #46 2019-01-26 13:00:19 -08:00
gl Update for glutin wasm_stub branch tracking Rust 2018 changes 2019-03-03 11:50:52 -08:00
model 1.13.2 (404) multiprotocol support (#67) 2018-12-28 21:22:58 -08:00
nbt 1.12.2 protocol support (340) (#40) 2018-12-02 19:37:41 -08:00
protocol Add Forge handshake support. Closes #88 (#134) 2019-05-05 18:39:58 -07:00
render Add support for compiling WebAssembly wasm32-unknown-unknown target (#92) 2019-03-03 08:32:36 -08:00
screen Add Forge handshake support. Closes #88 (#134) 2019-05-05 18:39:58 -07:00
server Add Forge handshake support. Closes #88 (#134) 2019-05-05 18:39:58 -07:00
types 1.14 protocol support (477) (#132). Closes #72 2019-05-04 16:04:19 -07:00
ui Add support for compiling WebAssembly wasm32-unknown-unknown target (#92) 2019-03-03 08:32:36 -08:00
world Add 18w50a (451) multiprotocol support (#79) 2019-01-10 17:21:19 -08:00
auth.rs Update to use crate:: for current crate, for Rust 2018 edition 2018-11-04 12:06:00 -08:00
chunk_builder.rs Use field init shorthand, instead of x:x, just x, 2018-11-04 13:43:30 -08:00
format.rs Recognize translate text components, instead of showing "UNHANDLED" 2018-12-02 19:25:11 -08:00
item.rs 1.13.2 (404) multiprotocol support (#67) 2018-12-28 21:22:58 -08:00
macros.rs Base implementation for worlds/blocks 2016-03-18 22:24:30 +00:00
main.rs Add command-line option to change default protocol version 2019-05-06 16:00:01 -07:00
resources.rs Add support for compiling WebAssembly wasm32-unknown-unknown target (#92) 2019-03-03 08:32:36 -08:00
settings.rs Add double-jump to toggle creative flight. Closes #46 2019-01-26 13:00:19 -08:00