Giter VIP home page Giter VIP logo

light-reflective-mirror's Introduction

Hi there ๐Ÿ‘‹


light-reflective-mirror's People

Contributors

cxxpxr avatar derek-r-s avatar mukaschultze avatar sableangle avatar tufcode avatar

Stargazers

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

Watchers

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

light-reflective-mirror's Issues

Trying to connect in unity but no luck!

Hi, i've setup relay server exactly the way showed in the youtube videos, but no luck inside Unity to connect to relay server. Please can you send me the discord changel to see what could be? thanks!

Missing LICENSE file

The read me says it uses the MIT license but I cannot find it in the repo iself. I assume it is missing?

Issue with lrm.Dll

Hi! When I try to run dotnet lrm.dll it throws an json parse error (LRM.runtimeconfig.json file) In Linux machine

Can not connect to the LAN host server.

Using LRM v11 and Mirror v42.2.12(current version in assetstore).
When host and client are in the same LAN.(Using kcp direct connect)
Hosting server on like 192.168.0.100,
and client on like 192.168.0.101,
after clicking join server which serverId get from the relayServer,
console show the following log:

KCP: Connection timed out after not receiving any message for 10000ms. Disconnecting.

Is the LRM not compatible with the LAN or is there a way like network discovery to connect in LAN?

Dedicated server config

Hi Derek-R-S,
I have some issues using the server on a remote (linux) machine,
The server dll starts e shows up all the standards messages, it receives client connections as well.

The things gets weird on client side when starting mirror as a host/server and the LRM transport does not receives back the "Server Id" from the relay.

Tried on your machine [34.67.125.123] and on a local network machine and it works as expected (very well btw!)

so... is there any config I should pay attention on for a linux (debian10) server?

Room status

Thank you for the great project.
It's really good starting point for me.

  • when host start playing the game, is there a logic to prevent not joining to the game?

AWS connection issues

Absolutely love this asset and the YouTube tutorials, thank you so much for putting them together!

I'm trying to set up an AWS relay server and am not having any luck just yet. I've got LRM installed and running on the EC2 instance without any problem, and I've allowed incoming traffic from ports 7776, 7777, and 8080 on the server.

While following the Unity tutorial, I'm getting a KCP timeout error in Unity after 10 seconds: KCP: Connection timed out after not receiving any message for 10000ms. Disconnecting.

I've tried pasting both the public and private IP addresses of the EC2 instance into the LRM Server IP field with the same result. Can you think of anything I might be missing or if there's something AWS-specific I should be doing?

Thanks again, really appreciate your work on this!

V12 crash on debian

Hello,
I am developing, I have the node server which is launched on debian by "screen -dmSL servrelay dotnet LRM.dll".

And since these last days, the server crashed randomly or so during my test and debug but I did not make any changes in LRM, only listed my game.

I have UseEndpoint, EndpointServerList and EnableNATPunchtroughServer enabled in the config
and i use KcpTransport

this is my log (sorry i have only that):

Unhandled exception. System.ArgumentOutOfRangeException: Length cannot be less than zero. (Parameter 'length')
at System.String.Substring(Int32 startIndex, Int32 length)
at System.Net.HttpListenerRequestUriBuilder.GetPath(String uriString)
at System.Net.HttpListenerRequestUriBuilder.BuildRequestUriUsingRawPath()
at System.Net.HttpListenerRequestUriBuilder.Build()
at System.Net.HttpListenerRequest.FinishInitialization()
at System.Net.HttpConnection.OnReadInternal(IAsyncResult ares)
at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Net.ContextAwareResult.Complete(IntPtr userToken)
at System.Net.Sockets.SocketAsyncEngine.System.Threading.IThreadPoolWorkItem.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()

Thanks for help

WebGL build crashes when accessing LRM server

My WebGL game crashes when making a request to https://relay.example.com:8080/api/compressed/servers (where relay.example.com resolves to a digital ocean vps).

Visiting the url through firefox shows the following:

Secure Connection Failed

An error occurred during a connection to relay.example.com:8080. SSL received a record that exceeded the maximum permissible length.

Error code: SSL_ERROR_RX_RECORD_TOO_LONG

- The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
- Please contact the website owners to inform them of this problem.

If I visit the url with http instead of https, everything seems to be fine.

Are there settings in LRM/Mirror that I'm missing that can help with this?

Unstable Direct connection module

Evn.
Client to Server transport : SimpleWebTransport
Direct connection module transport : KcpTransport
Relay Server hosted on a NAS's VM with public ip address

LightReflectiveMirrorTransport component setup
Relay Server port : 7000
NAT punchthrough port : 7001
Kcp transport port : 7777
SimpleWebTransport port : 7778

The Direct connection works great while all client under same LAN.

But if I change one of my unity editor into iPhone's hotspot network and try to connect to host.
The direct connect will failed.
Host console will show msg "Direct Connect Client Connected" and after a while and new msg "Kicked direct connect client." shows.

Client show msg "KCP: Connection timed out after not receiving any message for 10000ms. Disconnecting."

GET request to http://{loadBalancerAddress}:{loadBalancerPort}/api/join/ returns "Method Not Implemented: Get /api/join"

Hello! I've followed both tutorials and put everything on an EC2 instance on AWS, but nothing seems to be happening. I state that I have a lot of inexperience on the BE side, so I might be doing something wrong.

Nothing seems to happen when I connect to Unity, and doing some Debugging I noticed that this request returns Method Not Implemented. Any idea what I might have been doing wrong?

ServerId is wrong on LightReflectiveMirrorTransport component

Use the ver in Release 9.0.
The ServerId on LightReflectiveMirrorTransport component didn't match the value return by the API /api/servers.

For instance, on my Unity host the ServerId value is 19, but the /api/servers return value like this:
[ { "serverId": 963094828, "hostId": 22, "serverName": "Squid_4145's Room", "serverData": "Map 1", "isPublic": true, "maxPlayers": 6, "clients": [] } ]

Seems the hostId is fill into the ServerId on host's LightReflectiveMirrorTransport component.

KCP: Random amounts of lobbies crashing/freezing at random intervals

I'm using v12 and one relay server, and the image attached is (likely) outputted to the console when it crashes.
By crash/freeze, I mean the lobby stops sending and receiving traffic. No disconnect packets are sent from what I've gathered, but the relay itself is still functional, but people just need to restart their lobbies.
unknown
I am also using a piece of software called pterodactyl to "host" the web panel for the console, and I'm using AWS Lightsail to host it.
If you need to quickly contact me, my Discord is Virtual#7802

EDIT#1:
After looking through the source code of KCP and the relay, it seems it's just an issue with KCP, so I am going to switch the relay to use websockets or something else and see if that fixes it.

The ability to use user's Json Library in LRM

Since there is usually already a Json library is in a Unity project. (But maybe not JSON.Net)
I wish to let user use their Json Library to deserialize json in LRM.

Currently I do some modify like this

Add the delegate in LightReflectiveMirrorTransport

public static System.Func<string, List<Room>> OnDeserializeRoom;
public static System.Func<string, RelayAddress> OnDeserializeRelayAddress;

Then register the delegate. In my case I use LitJson.

(Some script execute before Transport init)

public override void Awake()
{
        LightReflectiveMirror.LightReflectiveMirrorTransport.OnDeserializeRoom += (result) =>
        {
            return LitJson.JsonMapper.ToObject<List<LightReflectiveMirror.Room>>(result);
        };
        
        LightReflectiveMirror.LightReflectiveMirrorTransport.OnDeserializeRelayAddress += (result) =>
        {
            return LitJson.JsonMapper.ToObject<LightReflectiveMirror.RelayAddress>(result);
        };
}

I have done this modify in my local branch, if you also think this is a good idea, I will make a pull request.
Or any suggestion about the implementation is welcome.

Endpoint port issue?

Hello,

On Ubuntu 18.04 when I run sudo dotnet LRM.dll there is an error about an endpoint service.

Starting Endpoint Service... Server: listening port=7777
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.HttpListener'.
at System.Net.HttpListener.CheckDisposed()
at System.Net.HttpListener.Stop()
at Grapevine.RestServer.Start() in C:\Users\scott\source\grapevine\src\Grapevine\RestServer.cs:line 174
at LightReflectiveMirror.Endpoints.EndpointServer.Start(UInt16 port)
FAILED
Please run as administrator or check if port is in use.

Host mode Client exits the game and reports an error

When the Client in Host mode is disconnected, LightReflectiveMirrorTransport._isClient = false will be executed first. When LightReflectiveMirrorTransport.DataReceived is executed and opcode == ServerLeft _isClient is already equal to false, the OnClientDisconnected event cannot be called normally.

Code

LRM version: BleedingEdge-v13.0
Mirror version: v67.1.0

Typo in config.json

There is a typo in config.json - which should probably be updated at some point. This might require support for both the correct and incorrect spelling to prevent breaking existing LRM servers.

"EnableNATPunchtroughServer":
"NATPunchtroughPort":

Should be:

"EnableNATPunchthroughServer":
"NATPunchthroughPort":

ConnectedToRelay is registered too late

Latest change breaks connecting to relay:
```
private void OnEnable()
{
clientToServerTransport.OnClientConnected = ConnectedToRelay;
...


If I have "Connect on Awake" checked then `ConnectToRelay()` is called before `OnEnable()` so `ConnectedToRelay()` is never called and LRMTransport doesn't know it was actually connected(_connectedToRelay remains false).

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.