Giter VIP home page Giter VIP logo

bytesocks's People

Contributors

lucko avatar

Stargazers

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

Watchers

 avatar

bytesocks's Issues

Is the target Java version for this project Java 8?

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?

LuckPerms plugin cannot establish socket connection

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:

  1. curl localhost:3001 (direct port) and curl localhost:3000 return just a "/"
  2. curl -IL localhost:3001 (direct port) and curl https://localhost:3000 (https because nginx redirect) output is 404
  3. For both i can create channel curl localhost:*/create
  4. Can connect to socket 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

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.