LiteNetLib icon indicating copy to clipboard operation
LiteNetLib copied to clipboard

Add UPnP port forwarding

Open RevenantX opened this issue 7 years ago • 11 comments

For now you can use https://github.com/lontivero/Open.NAT

RevenantX avatar Nov 04 '16 15:11 RevenantX

I think it would be smart to keep it modular. We can provide a best practices document for implementing Open.NAT with LiteNetLib. This leads leads to better code for both the person implementing litenetlib and the authors maintaining litenetlib.

miketheprogrammer avatar Jan 22 '18 14:01 miketheprogrammer

I wrote a Upnp solution for unity awhile back but.. I was just learning about it at the time it works with 80 percent of routers china brands have some issues.. https://hastebin.com/utimagavuc.cs here is the code maybe you can get an idea from it.

levonravel avatar Jun 26 '18 17:06 levonravel

Link not working : (

RogyDev avatar Jul 07 '19 07:07 RogyDev

Link not working : (

https://pastebin.com/tYFctzdM

public static void Discover(int port, NetSocket socket) <--- Remove NetSocket socket then fire Discovery(port you want to open)

levonravel avatar Jul 07 '19 19:07 levonravel

thanks

On Sun, Jul 7, 2019 at 8:08 PM Levon Ravel [email protected] wrote:

Link not working : (

https://pastebin.com/tYFctzdM

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/RevenantX/LiteNetLib/issues/11?email_source=notifications&email_token=AKJNX52XOZDFENG57QQWYIDP6I5K3A5CNFSM4CVGTGM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZLRIVA#issuecomment-509023316, or mute the thread https://github.com/notifications/unsubscribe-auth/AKJNX55DXAT4PJZWPAFT7GLP6I5K3ANCNFSM4CVGTGMQ .

RogyDev avatar Aug 14 '19 05:08 RogyDev

I test it but always say "No network adapters with an IPv4 address in the system!". any fix plz ?

RogyDev avatar Aug 15 '19 21:08 RogyDev

let me rework it a bit and repost the code.

levonravel avatar Aug 16 '19 00:08 levonravel

I test it but always say "No network adapters with an IPv4 address in the system!". any fix plz ?

https://pastebin.com/wLUcLgvx took the throw out of the loop and changed the calls a bit.

levonravel avatar Aug 16 '19 00:08 levonravel

it's working good, thanks.

RogyDev avatar Dec 24 '19 22:12 RogyDev

it's working good, thanks.

your welcome.

levonravel avatar Dec 24 '19 22:12 levonravel

@RevenantX any chance you are looking to explore a full time opportunity? I'm the founder of a gaming startup, really like what you've been doing with litenetlib. We're looking to add an experienced multiplayer engineer to our team. Are you open to chatting?

shekit avatar Apr 20 '21 22:04 shekit