Skip to content

remote ip never connects, localhost works fine #34

@luneSnowtail

Description

@luneSnowtail

when using this plugin in a local pc using localhost everything is fine but using this on a remote pc using an ip address never connects, an user in a discord server mentioned this.


StreamController version: 1.5.0-beta.8
OBSPlugin version: 1.0.1

I saw that a recent commit changed how the IP validation worked, and it was causing me issues. I'm using 2 PCs with the Sunshine/Moonlight combo with the former running OBS and the latter running StreamController, so it's also important the two can communicate.

The issue seems to be Line 29 on OBSController.py for IPv4 addresses. This always raises a ValueError with a non-localhost IPv4 address (or even IPv6) as it's not actually checking an IP on the right side, if I understand it right:
if not addr.version == ipaddress.IPv4Address.version:

Changing it to this fixes the issue:
if not addr.version == 4:

Additionally, the If statement on Line 15 doesn't block non-localhost entries due to the try block if I'm understanding it correctly (maybe move it below the IPv4 check in the block?), although it wouldn't help in my scenario if it did.

I would do a pull request myself if I understood how, maybe within 24h if nobody else does.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions