izivkov / RemoteVideoCam

MIT License
129 stars 15 forks source link

Let me use this app without wifi #31

Open arodier opened 2 months ago

arodier commented 2 months ago

I am using this application as an alarm in one room, and the viewer is connected to my box's vpn. So, they're on the same network, even when I am away.

Please, remove the obligation to use the wifi. For those using a VPN on two phones, this is not needed either.

izivkov commented 2 months ago

Unfortunately, this phones cannot find each other if one or both are using VPN. Here is the technical expination:

When a device connects to a VPN, its network traffic is routed through a virtual private network, effectively isolating it from the local network. This means the device is not directly visible on the same subnet as other devices connected to the local Wi-Fi. Network Service Discovery (NSD) relies on multicast DNS (mDNS) for device discovery, and mDNS typically operates within a local network (i.e., a specific IP subnet). Devices behind a VPN might not participate in this mDNS discovery.

arodier commented 2 months ago

Nope.

My router has VPN server included (wireguard), and I use it when I am abroad, to watch the BBC. The VPN runs on the network, and gives IP addresses in the same LAN as the main home network, and I can access my Synology from the phone.

In other terms, yes, it works, so let the users choose if they want to use wifi or not.

izivkov commented 2 months ago

I'm not actively restraining using the VPN. As I explained before, the VPN devices cannot find the other wifi devices because they cannot be looked up via DNS. If they knew each other's IP address they can communicate.

This is an open source project, so feel free to submit a pull request if you think you can add this feature.

Regards

On Thu, Sep 26, 2024, 11:30 AM André Rodier @.***> wrote:

Nope.

My router has VPN server included (wireguard), and I use it when I am abroad, to watch the BBC. The VPN runs on the network, and gives IP addresses in the same LAN as the main home network, and I can access my Synology from the phone.

In other terms, yes, it works, so let the users choose if they want to use wifi or not.

— Reply to this email directly, view it on GitHub https://github.com/izivkov/RemoteVideoCam/issues/31#issuecomment-2377298900, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7M37SRB5VQHENSEE75NJLZYQSCVAVCNFSM6AAAAABO42YY7SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZXGI4TQOJQGA . You are receiving this because you commented.Message ID: @.***>

arodier commented 2 months ago

Please, just disable the WiFi enforcement, that's all I ask.

Removing a "feature" should be simple.

I have my own project to contribute.

Andre.

On 26 September 2024 17:38:18 BST, Ivo Zivkov @.***> wrote:

I'm not actively restraining using the VPN. As I explained before, the VPN devices cannot find the other wifi devices because they cannot be looked up via DNS. If they knew each other's IP address they can communicate.

This is an open source project, so feel free to submit a pull request if you think you can add this feature.

Regards

On Thu, Sep 26, 2024, 11:30 AM André Rodier @.***> wrote:

Nope.

My router has VPN server included (wireguard), and I use it when I am abroad, to watch the BBC. The VPN runs on the network, and gives IP addresses in the same LAN as the main home network, and I can access my Synology from the phone.

In other terms, yes, it works, so let the users choose if they want to use wifi or not.

— Reply to this email directly, view it on GitHub https://github.com/izivkov/RemoteVideoCam/issues/31#issuecomment-2377298900, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7M37SRB5VQHENSEE75NJLZYQSCVAVCNFSM6AAAAABO42YY7SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZXGI4TQOJQGA . You are receiving this because you commented.Message ID: @.***>

-- Reply to this email directly or view it on GitHub: https://github.com/izivkov/RemoteVideoCam/issues/31#issuecomment-2377444261 You are receiving this because you authored the thread.

Message ID: @.***>

arodier commented 2 months ago

I can see the error message here: https://github.com/izivkov/RemoteVideoCam/blob/dd2a1cb043c8710dcbd140973b9c76e7b0c17754/app/src/main/java/org/avmedia/remotevideocam/MainActivity.kt#L49

The fact that both nodes cannot connect could be another issue than wifi. For instance, some boxes don't allow wifi clients to "see" each other.

I will test again with a wifi access point.