lucko / bytesocks Goto Github PK
View Code? Open in Web Editor NEWFast & lightweight WebSocket server with channels.
License: MIT License
Fast & lightweight WebSocket server with channels.
License: MIT License
I see in the pom that the target Java version is Java 8.
javap -v BytesocksClientImpl.class
shows major version: 55
which corresponds to Java 11.
This is causing the class to fail to load on my server and breaking Spark.
Is this project somehow being compiled with JDK 11?
Hi, I'm trying to make a selhosted luckpermsWeb.
I raised a bytebin docker container and it works great
The web editor is already working, but not in dynamic mode.
Server running in docker
https://github.com/itzg/docker-minecraft-server
Server type - Spigot
Server version - 1.19.2
I am trying to raise websockets in docker
docker-compose.yml:
version: "3.8"
services:
bytesocks:
image: ghcr.io/lucko/bytesocks
ports:
- 3001:8080
environment:
# You can configure bytesocks using
# environment variables.
BYTESOCKS_MISC_KEYLENGTH: 15
extra_hosts:
- "host.docker.internal:host-gateway"
But I am getting these errors
docker logs mc-server:
[01:24:19] [Server thread/INFO]: sav_miner issued server command: /lp editor
[01:24:19] [OkHttp https://host.docker.internal:3000/.../WARN]: [LuckPerms] Exception occurred in web socket
java.net.ProtocolException: Expected HTTP 101 response but was '404 Not Found'
at me.lucko.luckperms.lib.okhttp3.internal.ws.RealWebSocket.checkUpgradeSuccess(RealWebSocket.java:224) ~[?:?]
at me.lucko.luckperms.lib.okhttp3.internal.ws.RealWebSocket$1.onResponse(RealWebSocket.java:195) ~[?:?]
at me.lucko.luckperms.lib.okhttp3.RealCall$AsyncCall.execute(RealCall.java:174) ~[?:?]
at me.lucko.luckperms.lib.okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?]
at java.lang.Thread.run(Unknown Source) ~[?:?]
[01:24:24] [luckperms-command-executor/WARN]: [LuckPerms] Unable to establish socket connection
java.lang.RuntimeException: Timed out waiting to socket to connect
at me.lucko.luckperms.common.webeditor.socket.WebEditorSocket.waitForConnect(WebEditorSocket.java:103) ~[?:?]
at me.lucko.luckperms.common.webeditor.WebEditorSession.createSocket(WebEditorSession.java:96) ~[?:?]
at me.lucko.luckperms.common.webeditor.WebEditorSession.open(WebEditorSession.java:87) ~[?:?]
at me.lucko.luckperms.common.webeditor.WebEditorSession.createAndOpen(WebEditorSession.java:62) ~[?:?]
at me.lucko.luckperms.common.commands.misc.EditorCommand.execute(EditorCommand.java:111) ~[?:?]
at me.lucko.luckperms.common.command.abstraction.SingleCommand.execute(SingleCommand.java:56) ~[?:?]
at me.lucko.luckperms.common.command.abstraction.SingleCommand.execute(SingleCommand.java:48) ~[?:?]
at me.lucko.luckperms.common.command.CommandManager.execute(CommandManager.java:265) ~[?:?]
at me.lucko.luckperms.common.command.CommandManager.lambda$executeCommand$1(CommandManager.java:169) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncRun.run(Unknown Source) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?]
at java.lang.Thread.run(Unknown Source) ~[?:?]
Caused by: java.util.concurrent.TimeoutException
at java.util.concurrent.CompletableFuture.timedGet(Unknown Source) ~[?:?]
at java.util.concurrent.CompletableFuture.get(Unknown Source) ~[?:?]
at me.lucko.luckperms.common.webeditor.socket.WebEditorSocket.waitForConnect(WebEditorSocket.java:101) ~[?:?]
... 12
This creates a channel
[02:18:38 INFO]: [CREATE]
channel id = JIVnBpcLwQ1n4pL
user agent = curl/7.87.0
ip = 192.168.192.1
I also have nginx configured. Because the plugin was throwing the sun.security.provider.certpath.SunCertPathBuilderException error. Therefore, I had to raise nginx to provide an https connection.
nginx.conf:
server {
listen 443 ssl;
ssl_certificate /certs/bytesocks/server.crt;
ssl_certificate_key /certs/bytesocks/server.key;
error_page 497 =301 https://$host:3000$request_uri;
location / {
client_max_body_size 30M;
client_body_timeout 60s;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect http:// https://;
proxy_pass http://host.docker.internal:3001/;
}
}
I don't think that's the problem either. Because:
curl -IL localhost:3001
(direct port) and curl https://localhost:3000
(https because nginx redirect) output is 404curl localhost:*/create
websocat ws://host.docker.internal:*/<id>
Unfortunately, I have not found documentation for bytesocks anywhere.
On the LuckPerms wiki under "Self hosting the web interfaces" also no mention of bytesocks
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.