#Coding free multiplayer [Looking for help & testers] Zero port forwarding

1 messages Β· Page 1 of 1 (latest)

livid lake
#

I would appreciate help on UI and in-game commands, the network stuff you can leave to me πŸ™‚

Updated January 9th:

I'm coding a way for players to join and host their own servers from their PC, without having to port forward, without risky protocols like UPnP.

The gist of it is, when you connect to a server (ex: hypixel.net), your local wifi temporarily allows hypixel.net to send you data.

Normally your wifi stops all data from coming, unless you connect to a server first.

This is called "hole punching", and it happens every time you use the internet; the tricky part is getting it to work for both the client and the server at the same time.

Both the client and server needs to have holes punched to eachother if they are both behind private wifi networks.

Only then can the client successfully connect to the server.

Thankfully I have found more than one method of doing this.

The video of the demo uses 300 lines and java.net.Socket.

The latest version uses a simple library, where you run a command on both ends, and it creates a reliable connection between the player and client.

Because it simply sends packets as byte arrays from your server to your players, it works for all versions of Minecraft, and has been tested on Beta 1.7.3, 1.20.4, and has support for Bedrock Edition players as well.

Vanilla lan worlds and locally running servers with plugins are both supported.

https://www.youtube.com/watch?v=tx4jvZCSlXA

https://github.com/DeflectoMC/Multiplayer-Possible/

A demo of a program I wrote in Java that lets you form a tunnel between two users on separate LAN networks.

This can be used for a variety of purposes, from free game servers with plugins to in-game voice chat, and can be done in any general purpose programming language.

If you're interested in helping me create a multiplayer network out of th...

β–Ά Play video
GitHub

A simple demonstration program on doing LAN outside of LAN - GitHub - DeflectoMC/Multiplayer-Possible: A simple demonstration program on doing LAN outside of LAN

sturdy jasper
#

You say this doesn't use port forwarding. How does it then allow two clients on separate networks to connect. Does it use uPnP (which is often not available)? Does it use a external server (which isn't ideal for lag and security)? Could you share some code of how this works?

livid lake
livid lake
# sturdy jasper You say this doesn't use port forwarding. How does it then allow two clients on ...

Thanks for your questions! I appreciate that you took interest. I've just submitted a video demo of it in the comment above this one.

How does it then allow two clients on separate networks to connect.

TCP simultaneous open. Both the server and the client use a client socket as an intermediary.

Does it use uPnP (which is often not available)?

No! Just vanilla Java Sockets.

Could you share some code of how this works?

I'm going to be publishing the code to GitHub soon, as well as making a video showcasing exactly how it works.

However you're welcome to DM me and I'll send you the source code (not the jar file), so you can read it for yourself.

When I compile it, the jar is only 11 kilobytes, so it's very small and simple.

spiral pagoda
#

this is very interesting

#

how exactly does it punch through NAT?

spiral torrent
#

The actual part that causes pain

livid lake
#

hahahah xD true... explaining it is hard lol

#

you can also ask to see my code btw, I did it in a few hundred lines

#

I'll be making a video tutorial on it soon πŸ™‚

peak cosmos
#

this is incredibly interesting.
how secure is this?

livid lake
#

more secure than port forwarding

#

you temporarily allow one person to connect at a time, and not the entire internet.

with some extra code it could be automated

craggy cloak
#

Huh, I expected this to be a jokey request, but this is actually pretty awesome!

#

Have you considered UDP punching as well?

#

The majority of multiplayer mods i've worked on used UDP Tunneling w/o proxies to manage without port forwarding permissions

patent bear
#

Wow thats extremly cool o.O

livid lake
#

thanks πŸ™‚

patent elbow
patent elbow
livid lake
#

Do you know if there's any way to get STUN to work on symmetric NATs by chance?

patent elbow
livid lake
#

lol fair :)

#

there's also Ice4J and libdatachannel for stun clients

livid lake
# craggy cloak Huh, I expected this to be a jokey request, but this is actually pretty awesome!

It's a request for collaborators as I see so much potential (client-sided /friend, /party, /join, voice chats, cross-server /msging, self hosted servers, etc) that I think people should get together and make an open source project around it.

Eventually someone will make an entire alternative for server hosting with this.

I'm okay to do it all on my own, but that'd certainly be a longer route, and I think a lot of people would love to see this happen πŸ™‚

patent elbow
#

Isn't it just easier to use say ZeroTier or... Hamachi yeefuckinhaw?

#

Also, there are free tunnels.

livid lake
#

sadly they all have bandwidth limits, and some close after an hour

patent elbow
#

For some reason WebRTC has TURN server as fallback when it is unable to connect using STUN.

chilly shell
#

this seems actually extremly cool

sly parcel
#

Once the code is up on GitHub, I'll tackle any issues. 6 years of Java experience, only about 2 weeks of Fabric experience though.

pastel cargo
#

I'm really hoping you are using a standardized security protocol for this. As opening any sort of connection can be pretty dangerous.
I believe Lunar is using webRTC, for the extra security and fallback that it has.

livid lake
#

I saw you've used GitHub workflow actions before.

I had a guy the other day tell me he doesn't trust github, can't read code, doesn't know what workflow is, therefor a jar built from a workflow action could be a virus.

I'm sure you'd find that funny to hear, given your experience and understanding of it πŸ™‚

I'm guessing you know the provable security measures of compiling your code in plain sight using a build tool.

#

I'd love to talk to you about security in DMs though, jfyi this is not my first project that uses this technique, it's my 8th iteration so far.

This one is just the simplest and most beginner friendly for others to understand.

For the other ones, I used tried-and-tested, widely acclaimed encryption algorithms, and I certainly will use secure protocols when I turn this into a mod rather than a runnable jar. I previously used WebRTC in multiple projects.

#

This is probably not the best place to have a security debate/discussion though, as it might fill up the chat πŸ˜…

Are you familiar with cryptographic primitives? Ed25519? RSA? SHA3? Let's talk in DMs.

sturdy jasper
#

Opening any server to the internet has an inherent security risk (there can be vulnerabilities). Server hosters accept those risks. I guess the primary question is: could anyone connect to the shared server (not considering whitelist)?

livid lake
#

It's currently invite-only based connections.

livid lake
#

If anyone would like to help improve and expand upon this project so we can make it something top-notch quality for everyone, I would greatly appreciate the help ❀️

Though you are also fine to re-use it for your own individual projects, as long as you follow the license terms.

livid lake
pastel cargo
#

Current implementation is just a socket, so not much I can say about that

livid lake
pastel cargo
#

I thought you where going to post a custom networking protocol, not just a socket that passes through well established protocols.

livid lake
#

I thought it was likely the case that you're a security specialist; not an amateur.

But the way you've gone about this towards me just hurts when I've already gotten doubted for months with 0 help and almost 0 interest from anyone else until today

livid lake
#

If you call plain old sockets insecure, then so is Minecraft's Add Server button. This is not "dangerous" any more than vanilla is.

#

In fact, vanilla 1.16+ has an encryption protocol

pastel cargo
#

Didn't mean to come off as negative, it's just that ive seen people do some pretty sketch stuff in the past.

livid lake
#

No worries, all forgiven.

covert quiver
#

Hey ! That’s an amazing idea ! I have always wondered how essential work

craggy cloak
#

@livid lake If you need any UI work

#

Hit me up

covert quiver
#

I would like to help if needed !

swift lance
#

I'm confused, is this different than e4mc?
I read more messages, this is clearly out of my knowledge realm xd

chilly shell
vapid plaza
#

i would love to see this integrated into the minecraft UI. i dont have experience with UI edits (yet) nor the time to learn it, but if no one has done it by the start of february, id love to get into that

#

kinda busy with school right now

rough harness
#

Would be interesting to use this for a 1.7.10 Essential alternative, since there are none for that version.

lofty timber
#

and if hee xplains it for a dummy like me

unborn haven
#

holy shit

#

this is crazy

vapid plaza
#

i took a look at the code and it seems the actual hole punching is done by another tool called gole

#

currently reading the source code of that cause im curious if this can be done in java natively

#

i mean it probably can, but is it feasible

sonic crane
#

feasible yes

#

feasible for your time? no

livid lake
# vapid plaza i took a look at the code and it seems the actual hole punching is done by anoth...

Like corgi said, it wasn't feasible in time.

The original code was 300 lines of pure Java using TCP hole punching. I learned from some generous testers who dedicated their time that we have to use UDP instead of TCP to get it to work for them. By then it was already public, and a fix had to be made within a few days.

All the nice things TCP does to simplify things for developers don't exist with UDP. You can't simply take Minecraft's TCP packets and translate them to UDP, without tons of work, trial and error, and dedicated testers... unless you use Gole.

As a modmaker, your code can simply run a command, and Gole will handle 100% of the TCP-UDP translations for you magically without any errors. It has over 70+ stars on GitHub like you saw, is several years old and has been thoroughly tested.

As soon as I started using Gole UDP instead of Java TCP, peoples' connectivity issues disappeared entirely. Now almost everyone is able to use this project with success, and it's freed my time so I can focus on making this as user friendly as possible πŸ™‚

sonic crane
#

hey man just a quick opinion:

#

less whitespace more talk

#

this project is cool im not doubting any of that i just think your messages could flow better if you condensed them to a point or two

#

discord users are used to seeing either paragraphs or icons along with text unless theyre in compact mode, best to appeal to the cognitive idea of "this is part of the previous paragraph"

sonic crane
#

i just have bad mental wibbly wobblies that i will not get into and it makes it rather difficult to stop myself from skipping past everything, though you can ignore everything i said its ultimately just a subjective style choice?

fossil horizon
#

tldr? (honestly this sounds like an advert....)

sonic crane
#

LAN over public internet

#

it is an advert for a mod

sonic crane
#

also an advert

fossil horizon
#

this reads like they are trying to sell people on that app

sonic crane
#

i thought its free

fossil horizon
#

everything about it is over the top, hyperbolic...

#

Everyone, Everything, Now i can enjoy life, etc etc

sonic crane
#

im like 90% sure gole is an open-source library

fossil horizon
#

it is

sonic crane
#

cough redacted cough cough

fossil horizon
#

"sell" as in "convince people that using it is the best thing in the world" as a salesman would

sonic crane
#

i can deal with a bit of funky talk if it means a new nice public library

fossil horizon
#

"in 300 lines of code I [used some other person's app to] do what X Y Z big mods discovered" ... as long as its pure java, sure. i dont want another "i am adding a random executable, but its fine because...security?"

sonic crane
#

ouch

#

its not MIT?

fossil horizon
#

what isnt?

sonic crane
#

the repo

#

apache license

sonic crane
#

just change this up deflecto

File g = null;
for (File f2 : f.listFiles()) {
    if (f2.getName().startsWith("gole")) {
        if (f2.getName().contains(".zip") || f2.getName().contains(".tar")) {
            gui.info(f2.getName() + " is a compressed file and not the actual program.\nYou'll need to extract it into your Multiplayer-Possible folder");
            if (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Action.OPEN)) {
                Desktop.getDesktop().open(f);
            }
            return;
        }
        f2.setExecutable(true);
        g = f2;
        break;
    }
}
#

dont do dat

fossil horizon
#

thats the first one

#

but also, there isnt verification before just running a process on the computer

sonic crane
#

oh it just takes the file and runs it?

fossil horizon
#

yup

sonic crane
#

so feedback would be change to MIT (me) and fix up file shenanigans (you)

#

summarized

#

is the gui part necessary?

#

oh yeah this is just for LAN stuff, nevermind the license works

fossil horizon
#

i mean...it could be completely replaced by a quick python script, or a bash/batch/powershell script

a fun toy for sure but with the sales pitch speak and the concerning code....hard pass

sonic crane
#

in essence its just running gole with some parameters right?

fossil horizon
#

yep

sonic crane
#
if (protocol.equals("udp")) {
  builder.command(g.getAbsolutePath(), "-v", "udp", addr1 + ":" + port1, addr2 + ":" + port2, "-op", mode, "-fwd=127.0.0.1:" + gamePort);
} else {
  builder.command(g.getAbsolutePath(), "-v", "udp", addr1 + ":" + port1, addr2 + ":" + port2, "-op", mode, "-fwd=127.0.0.1:" + gamePort, "-proto=kcp");    
}
#

i think i have to agree with linguardium this definitely seems like it can be be a bash script, its like 5 or 6 validation steps then running a command with perhaps an extra parameter or two

#

its just more sus to the casual user this way

#

even if they can see its like 3 lines i dont trust minecraft players to have the appropriate amount of braincells to be literate

fossil horizon
#

also, not packaging the dependency with it and instead having the user download it puts the user at risk from putting anything else with the proper name in the folder.

sonic crane
#

if you install gole its actually named something else

fossil horizon
#

with a packaged dependency, you can hash before running (even though i still disagree with slapping a gui on top of someone else's hard work and calling it yours...)

sonic crane
#

oh wait nevermind its literally just checking startsWith

fossil horizon
#

well..thats going to be fun to troubleshoot

sonic crane
#

so uh, macos version for TCP

./gole-darwin-amd64 -v tcp 0.0.0.0:3333 4.4.4.4:4444 -op server -fwd=127.0.0.1:8080
#

wait ill just add the variables

#

how do i do variables in shellscript again e.e cmere gpt

fossil horizon
#

VARIABLE=thing

echo $VARIABLE

sonic crane
#

oh yeah its the exact same

#

whatever im just gonna gpt it anyways :>

fossil horizon
#

neat idea, neat program. glad you are helping your community find a solution. I recommend going forward you focus on security and repeatability. package (or index) the releases, identify the computer architecture and from there identify the correct indexed/packaged app. verify hash of app before running (since you cant really sandbox it)

#

i would also recommend you check for administrative rights and warn the user if they are running as admin/root

sonic crane
#

i thought its between tcp and udp

fossil horizon
#

no, they arent using tcp at all

sonic crane
#

the else is still doing udp though

fossil horizon
#

its doing secure udp basically

sonic crane
#

String protocol = edition.contains("Java") ? "tcp" : "udp";

fossil horizon
#

kcp is basically tcp over udp.

sonic crane
#

ah

#

yeah thats my bad i still need to get into network protocols

fossil horizon
#

or maybe the other way around? i dunno

sonic crane
#

runs on TCP

#

nope wait

#

runs on UDP

fossil horizon
#

yeah, its udp

sonic crane
#

maybe wait for that one cyber security guy

#

lol

fossil horizon
#

lol, its basically kcp protocol riding udp datagrams

sonic crane
#

java edition / macos

#!/bin/bash

FILE_PATH="/path/to/your/file"
ADDRESS1="your_address"
PORT1="your_port"
ADDRESS2="their_address"
PORT2="their_port"
GAME_PORT="25565"

command="$FILE_PATH -v udp $ADDRESS1:$PORT1 $ADDRESS2:$PORT2 -op server -fwd=127.0.0.1:$GAME_PORT -proto=kcp"

echo "Running: $command"
eval $command
#

theres still more stuff to be done

#

i cant be bothered i spent like 10 minutes getting my chatbot (just a finetuned LLM, not "my") to shut up and give me a right answer

#

kept telling me about fedex

#

dont ask its a work in progress

fossil horizon
#

lol

sonic crane
#

i think network protocols confused it

#

because ive been training it on my geodata

#

so if im at X street and stuff

fossil horizon
#

i dont want to discourage OP, i think there is promise to this if they are actually going to fully support it, but at its current state it puts users at risk and has several expected usability issues

sonic crane
#

alright corgi out

#

i think this mans life has been successfully ruined for the day, a job well done

#

i will clarify that this is a joke

#

my uh.. sense of humour if you can call it that has got me banned from way too many servers

#

back to being out

proven wasp
#

Chiming in since I definitely do not have the time nor incentive to work on such a thing, and if anyone is interested is having mods automatically be downloaded based on a server(host) modlist check, perhaps a MD5 check for each mod to see which ones have been updated so it can be re-downloaded. This would be a game-changer for tools like Essential, e4mc, World Host. Definitely would need fabric/forge to support it as well since you can't just have the client download all the different mods and have a bunch of mods that are from different servers in the same folder. This could definitely work with symbolic links though, having the server mod that does this symbolic linking the mods into the mod folder when that specific server is being joined etc. Would be a game-changer for sure.

fossil horizon
#

bclib does this already i believe

#

essential also already has an autoupdater and loads its own classes in separately from its loader mod

proven wasp
proven wasp
#

but it doesn't automate it for you

#

you have to set it up in config

#

would definitely be nice to take it a step further

fossil horizon
#

By default, the modpack will automatically synchronize all mods, configs from default server directories to the modpack. (Check syncedFiles list in /automodpack/automodpack-server.json)

#

i mean, by default it covers your described use-case

proven wasp
#

Now that you mention it, it does make sense. I was having qualms with it because I wasn't using tools like Essential, but had server and client mods curated, because you know how server mods a lot of times don't work on client and vice versa.

#

But it does make it a lot easier if you don't have to care about what goes where

fossil horizon
#

To add more mods to your server, place them in the /automodpack/host-modpack/mods/ directory. And so analogically to add shaderpacks, put them in /automodpack/host-modpack/shaderpacks/. You can create any subdirectories you need within /automodpack/host-modpack/ folder.

#

you can also put your clientmods in here to sync them to clients

#

it also auto-excludes serverside mods by default

proven wasp
#

Wonder if it will work with Essential and World Host etc, it should but there's a small chance it won't

lofty timber
#

I have just worken up, time to read all of dis

fossil horizon
#

if they proxy route only the server port then it wont, because they cant reach back to you (you arent running a server)

proven wasp
#

Gonna test it and let you know

#

cheers

livid lake
#

It's not simply here to promote what's been done so far, but to find anyone who wants to help with it.

fossil horizon
#

ah, i must have missed that. it really did read like a "look at what i did, so amazing!"

livid lake
#

If you don't like Gole, you're welcome to join me btw in slowly trying to get rid of it and replace it with a pure Java solution

fossil horizon
#

i dont mind gole, really, but the implementation is dangerous. (was also about 3/4 done with the message before you deleted)

livid lake
#

If you want to talk to me rn about anything you said earlier, I'll have a friendly dialogue with you, I can't do a mologoue tho

#

sorry for deleting my long answer

fossil horizon
#

no worries, I wasnt looking for a response. I was voicing my concerns over the initial approach being rather sales pitchy (which corgi explained was just how you talk). I realized after the fact that i was coming across rather harsh, which wasnt my intent, i was just concerned over the approach

livid lake
#

my original idea was to DM devs who knew java and were developing for servers etc, or looking for hire.

#

then to tell them this idea and its potential, and see if they wanted to do it together

#

understandably some of them cared about profits or making their own servers big, not helping the broader minecraft community as a whole

#

I had to do a "sales pitch" as you call it to even just find a few testers tbh...

fossil horizon
#

that sucks, really

livid lake
#

I get your concerns over Gole

#

it wasn't the original plan

#

I gave up on hiring testers, as it was so hard, one guy even told me he didn't trust github over spigotmc

fossil horizon
#

gole isnt actually the concern, its how its being implemented into the application

livid lake
#

I rented a Windows desktop PC to test on two wifis if connections would work.

#

That was the version in pure Java with 300 lines

#

It worked for me, and the virtual desktop I rented

#

then I asked people who joined the discord- can we test it?

livid lake
#

For now it works, because Gole itself is safe, and as long as a player doesn't put a virus into the folder and rename it Gole, they're totally safe.

livid lake
livid lake
fossil horizon
#

the way its designed, correct me if I am wrong, the player still has to configure the p2p traffic, right? like they need target other player's WAN ip?

sonic crane
#

i just popped in here to check if everything was fine, coincedentally theres a conversation

livid lake
#

yup

sonic crane
#

not what i mean

#

and not what i said

#

but i can see where you took that interpretation from

livid lake
sonic crane
#

yes

#

it was a recommendation and i was mostly talking about the amount of whitespacing instead of collating some points

livid lake
#

I had to address it to everybody all at once as it was a pretty major change, sorry

sonic crane
#

you can condense that all down to one paragraph and make it a lot easier to read for my brain, but in the end, a recommendation

livid lake
#

oh alright I get it. too many returns πŸ™‚

#

I'll edit that right now

livid lake
# sonic crane apache license

btw I picked apache because it's similar to MIT, but requires people who modify it to state changes/say that it's not the original version.

#

MIT lets people modify it as long as they include the copyright notice, and the original author can't be held liable

sonic crane
#

my problems not with apache its just that its currently a wrapper for a one liner script that uses apache instead of being public domain or MIT

livid lake
#

yeah you're right

#

I'm adding more features to it, my previous projects in different languages did the same thing + more stuff

sonic crane
#

I feel like you guys hate me
the accusations are false

fossil horizon
#

actually MIT is way more open than that, they can just repackage under a new license even

sonic crane
#

its called tough love

#

but i still love you

livid lake
#

they connect to a third server which exchanges the ips automatically

sonic crane
#

my brain feels like im rotated 90 degrees on the x axis so im gonna dip out

#

have fun

livid lake
#

the IDs are cryptographically secure

#

oh alr haha

livid lake
sonic crane
#

i think its called pitch

fossil horizon
#

vertigo?

livid lake
#

yaw and pitch probs yeah

#

feel better!

sonic crane
#

my heads not spinning im just literally 90 degrees fixed

#

why am i still here, bye for real now

livid lake
#

brb gonna help with the dishes haha

#

back

fossil horizon
#

I was thinking of a method to automate the ip exchange, but pretty much any method will require a third party of some kind so it doesnt really matter.

some mod ideas
user uses a command or button in game that takes a distant end player name and a server id.
server caches response with a timeout
other users that enter that same server id and the first party's name
server sends response to both players indicating that the exchange was successful
player 1 and 2 start attempting connection, once successful or after timeout, player 2 connects to player 1 over established external ip and port

livid lake
#

yeah, folks were concerned about security earlier I think, there's a way of cryptographically signing every message so that the third party can't send the wrong data

fossil horizon
#

since its per-player, the validation piece would be the player name

#

like, you could in theory spam every possible player's name but..

#

could pretty easily have the players use their own cloud instance or something, hmm, trying to think of the best easy way to handle it without complicated steps or requiring data collection

#

like, tools like ngrok already exist

livid lake
#

the thing is they aren't sustainable as free-only options for the company

#

they have to make money somehow to make up for the costs of receiving all your server's packets and then sending it to your players

fossil horizon
#

right, they have limitations and try to sell you on static ips and such as an incentive to pay them money

#

no matter what you have to rely on some backend system

livid lake
#

yeah

#

p2p might be the only long term sustainable option that's for free
I don't really blame the companies for limiting their free plans, it's just a matter of decentralization

#

Amazing multiplayer mod [Looking for help & testers]

fossil horizon
#

yeah, helper server via an easy cloud deployable dockerfile or nodejs package is probably the easiest way to handle that. each person wanting to host a "server" would deploy the app, then use that url to exchange info with their players

livid lake
#

Coding free multiplayer [Looking for help & testers] Zero port forwarding

#

just updated the main post! should be better now πŸ™‚

swift lance
#

I know! Use Smart Contracts! That'll solve everything!
||This is a joke, don't sue me||

livid lake
#

lol

swift lance
#

!!xkcd 2260

hollow anchorBOT
fleet falcon
#

Imagine a multiplayer game that doesn't suffer from server outages and that doesn't require regular income for the servers to run.

That's what I tried to do for Cubyz. And it actually works.

I'm using UDP holepunching with some modifications to initiate the connection. Because I'm using UDP I also had to effectively reinvent TCP to make sure i...

β–Ά Play video
vapid plaza
#

yeah it is, hole punching is exactly what is happening here

#

i actually had some time to quickly throw together java code, but i also only have a single WAN IP available so i cant test it

#

i was looking at how to find a free proxy and make it forward packets for me, just for testing, but i had to stop cause my exam was coming up πŸ˜„

#

there is one thing of the approach that i dont fully understand. when sending a "reconnaissance" packet to the remote peer, which port do you choose? you have to pick a random guess right?

#

you can only know the correct port after you receive something from them and it contains their sender address and port

patent elbow
vapid plaza
#

but when the first packet is sent, that port isnt known yet, it isnt even assigned yet

#

that only happens when the second client also sends a reconnaissance packet

patent elbow
vapid plaza
#

im talking about full p2p approach, without a server to determine outside port

swift lance
#

I mean another idea is just giving the host an "access code" with the port in it. Then they send it via 3rd party discord or whatever to their friends.

humble stump
#

something like STUN is necessary for hole punching afaik

vapid plaza
#

gole, the tool used here, does not use stun or anything similar

humble stump
#

the only case when you can avoid it is when at least a peer can know it’s own public ip:port pair through uPnP or NAT PMP

patent elbow
#

You need to exchange external (public) port somehow.

vapid plaza
#

its the reason im so fascinated with gole, cause using a stun server makes everything easier but requires obv to talk to a server that might not give a fully free service

swift lance
patent elbow
swift lance
#

Also I could be way off here, but can't you take a port and cross your fingers, then try again if it doesn't work? Mc servers in dev open to port 25565 and I've never had a problem with it.

#

Or is this an IP thing and I'm understanding less than the little I think I am?

patent elbow
patent elbow
vapid plaza
#

if i understand correctly, you are hoping to not have a symmetric NAT, cause it would mean that the following is possible:

  • send a packet to a random port on the other clients IP
  • keep doing this even though obv they will be stopped by their NAT
  • they send a packet back to you
  • in some types of NAT, this gets considered as an answer to your requests cause it comes from the same IP
patent elbow
#

keep doing this even though obv they will be stopped by their NAT
One packet should be enough, but if you consider packet loss it may be a good idea.

#

they send a packet back to you
Yeah, so they get an external port assigned too.

vapid plaza
patent elbow
#

in some types of NAT, this gets considered as an answer to your requests cause it comes from the same IP
Port must match too.

vapid plaza
#

see thats the part im confused about

#

youre never gonna see their answer if their external port turns out different than the one you guessed

patent elbow
#

That's why you need to exchange ports.

vapid plaza
#

how does gole do that then

humble stump
#

from a rough dig through its code it just doesn't

patent elbow
#

As I quoted readme of gole earlier, It looks like you need to pass external port of the remote client manually to gole.

#

They agreed on a pair of tcp ports to open :3333(A) and :4444(B)

humble stump
#

the command line expects you to tell it the peer's ip and port combination, and there doesn't seem to be any "hole punching" done?

#

also their handshake process exchanges the process pid... for some reason
just going to gloss over that

vapid plaza
patent elbow
#

If you know external ID and port you can just connect.

humble stump
#

that's the confusing part, yes

vapid plaza
#

that also raises the question how the original demo by deflecto even works at all, cause it does not specify ports

vapid plaza
humble stump
#

I guess you get to multiplex multiple connection as a singel one to the kernel?

patent elbow
#

Everything it does is probably proxying connection between local socket and socket used to send data with remote client.

humble stump
#

oh!

#

the code doesn't actually do a whole hole punching operation

#

what it does is it just sends a packet to the peer, and prints the current machine's ip:port paiir....

#

that makes less sense as I said it out loud

patent elbow
patent elbow
#

Then it relies on that the NAT will assign external port to the same port as the internal one.

vapid plaza
#

yeah so it relies on getting lucky with the particular NAT implementation

patent elbow
#

In my opinion yes.

humble stump
#

as a side note, actual holepunching tools that allows custom STUN(-like) services do exist already

#

one such example is n2n

#

or tailscale+headscale if you'd like to put in that much effort to set them up

patent elbow
livid lake
livid lake
#

good luck on your exams btw!

south plank
#

This is a pretty cool project, how is the testing going? I'm interested since I can't really port forward (ISP is run by clowns) and I'd rather not have to shell out money for a server every time I want to host a playthrough or defer the task to someone else

vapid plaza
#

if someone has time in the next few hours (and is okay with revealing their ip to me lol) lemme know, i want to run deflectos current implementation using gole and see what it does using wireshark

#

ideally id look at the traffic on my router but isp doesnt give us access to that irritatered

#

i have some ideas i want to test with java code but i need more info first

lofty timber
lofty timber
#

just ping me once you read this and are willing to get into a dc, prob wont read otherwise

vapid plaza
#

id rather do it in one of the vcs here

lofty timber
#

well then

#

les go

vapid plaza
#

gimme a minute

lofty timber
#

no problemo

lofty timber
#

@vapid plaza and myself somehow recreated it

#

although we did not manage to get his programm to work

#

we just used gole.exe in the cmd and it worked

#

we now managed to get his demo to work

lofty timber
#

We are just now trying to wrap our head around how after the first packet, bob knows which port to send to

lofty timber
#

I am writing a quick mod for this

lofty timber
#

i think i cooked this into a mod? i need to try with someone tomorrow

#

@livid lake if you are interested

#

Here ya go

livid lake
#

sure!

lofty timber
#

This should theoretically work, you have a tiny button in the main menu where you plug your values in

#

You then just start your lan world and it should hopefully work

#

Had no way to test it yet tho

#

Thinking about this, in today's age there should be a 80% chance a udp hole punch works

lofty timber
livid lake
#

ooh nice, so this is a full on fabric mod?

#

yeah you did a pretty good job with this πŸ™‚

livid lake
lofty timber
#

Currently the port to connect to

#

Just gets thrown into the log

#

So you gotta grab from there

#

But I have serious doubts that I nailed this first try

vapid plaza
#

im gonna look into converting the gole call into native java in the next few days

lofty timber
#

The man himself

lofty timber
#

Or leave it up to the user if they don't trust me

vapid plaza
#

do you do anything to get the users public ip?

lofty timber
#

Yes

#

It's built in, when you open the mods menu

#

It displays your own public IP

vapid plaza
#

neat

lofty timber
#

Were three lines of code

#

So nothing much really

vapid plaza
#

yeah

#

although its worth considering making that optional

#

since the goal of the mod is to not need any servers so it will be used by people who woud rather not contact random servers

lofty timber
#

Well I just ping an Amazon server

#

Which responds to me with my public ip

#

Which you eventually need to do

#

Because who in their right mind knows that shit out of their head

vapid plaza
#

i wonder if netty supports stun out of the box, that would be more open

#

cause i for one hate amazon xd

lofty timber
#

Was just the first up that crossed my finger

vapid plaza
#

yeah that can be smoothed out later

#

its just a proof of concept for now

lofty timber
#

There is also this

#

Goofy aaaah random website

vapid plaza
#

but stun is probably cleaner since its what its designed for, and it has a protocol and everything

lofty timber
#

Will look into that

#

Once I know this works

#

If both nats want it to workπŸ’€

#

If I release this, I know the day will come when a person cries because his nat just said

#

No

livid lake
livid lake
#

think it just finished downloading the minecraft jars, so I'm about to test it right now :D

lofty timber
#

Oh wow

#

Your Internet seems to kinda suck

livid lake
#

eh it took 2 minutes lol

#

I think it's just eclipse that takes so long e_e

lofty timber
#

Ah ok fair

#

Eclipseirritatered

#

When looking at this mod, I do not only punch udp holes, I punch holes into my wall

livid lake
#

nice! I see you added a p2p button in the corner πŸ™‚

#

one question, should I run this on windows right now or will it work on a Mac too?

#

looks like you got multiple OS supported, great!

lofty timber
#

Well I do not know if it crashes

#

It prob will

#

As GitHub gives me weird ass files when downloading the Mac and Linux artifacts

livid lake
#

if it does I'll do my best to help figure out why

#

oh oof

lofty timber
#

Just, files without endings

vapid plaza
#

thats normal

#

executables in unix-like systems have no file extension by convention

lofty timber
#

πŸ₯²

#

I just slapped a .sh and .app at the end of em executablesπŸ’€

vapid plaza
#

lmao

lofty timber
#

For Linux and Mac respectably

livid lake
#

testing it on two accounts rn

vapid plaza
#

yeah uh you shouldnt do that xd just leave the names

lofty timber
#

If you are on Linux or Mac this shit prob gonna crash

vapid plaza
#

its still gonna work, cause it doesnt depend on the extension, its just... not conventional

lofty timber
#

Ah cool

#

I guess I will just not go by conventionyeefuckinhaw

vapid plaza
#

at least linux ignores file extensions, idk if mac does

lofty timber
#

i would be suprised if this works

#

and not just instantly crashes

livid lake
#

how do I join the server btw?

#

gotta open to lan first right?

lofty timber
#

yes

#

when you open to lan

livid lake
#

anything needed for the port number?

lofty timber
#

it starts gole

livid lake
lofty timber
#

@vapid plaza what did you put into the port number

vapid plaza
#

wdym

lofty timber
#

when opening to lan

#

what did you input as the port

vapid plaza
#

depends how you have gole setup

lofty timber
#

did ya just leave it to default

livid lake
#

looks like 25565

lofty timber
vapid plaza
#

what port does it use to punch and what port does it loopback to

#

then you probably need 25565

livid lake
#

alright

lofty timber
#

ig just try

#

and see what happens

livid lake
#

so I've opened the lan world...

lofty timber
livid lake
#

would you mind telling me what I do to join as the client?

lofty timber
#

it will be spit into the console on the host, hopefully

#

for the time beeing

#

ah fuck

#

i am dumb as shit

livid lake
#

oof yeah

#

i found a small but fixable problem

#
java.io.IOException: Cannot run program "/Users/programming/Library/Application Support/minecraft/config/p2p4all/gole/gole-darwin/gole-windows-386.exe": error=2, No such file or directory```
lofty timber
#

one other problem is, well for starters, gole only starts when opening to lang

#

so we only have hosts

#

no clients ;/

#

i may have done an oopsie

#

lemme fix that

livid lake
#

np bro! this is really cool πŸ™‚ I think it's definitely surpassed Multiplayer-Possible so far

lofty timber
livid lake
#

yes, should I restart?

lofty timber
lofty timber
#

but this happens because i download mac natives

#

but try to search for the windows intel ones

livid lake
#

oh looks like I might need to change the config

lofty timber
#

ima quickly remake smth

lofty timber
livid lake
#

I'll need to for this particular instance

#

probably not when I do it on windows though

#

oh yeah that might be a small bug

#

says gole-darwin/gole-windows-386

lofty timber
#

yep

#

thats because i did a stoopid

#

and i now removed the need to start an lan server for the client

livid lake
#

on line 120-122 of GoleDownloader.java:

P2PConfig.goleFilePath = extractedFileFolder.getAbsolutePath() + "/gole-windows-" + (isIntel ? "386.exe" : "amd64.exe");

P2PConfig.isIntelCPU = isIntel;

P2PConfig.write("p2p4all");```
lofty timber
#

once the p2p screen is closed

#

gole starts

lofty timber
livid lake
#

working on it right now πŸ™‚

lofty timber
#

ok chief

#

just send me the patched file

vapid plaza
lofty timber
#

and ima push that along my changes

vapid plaza
#

386 doesnt mean intel, and amd64 doesnt mean amd

livid lake
#

do you know if there's a way to check the arch using Oshi btw?

vapid plaza
#

386 means 32 bit x86, and amd64 means 64 bit x86

lofty timber
#

bruh

livid lake
#

guess we could use System.getProperty("os.arch")?

lofty timber
#

private enum OSType {
WINDOWS,LINUX,MAC;
}

#

i already have this

#

gole downloader 34, after that its defined

livid lake
#

well regardless, I'm rebooting my game, just change the config, gonna see how well it works πŸ™‚

#

I'm guessing it'll work fine on my mac after the config change

lofty timber
#

i highly doubt that

#

there are other things wrong that you havent got to yet

#

which i am currently fixing

#

@livid lake pushed fix

#

should now load correct gole

livid lake
#

that was fast!

lofty timber
#

and it now starts gole, once leaving the p2p screen

#

maybe it works now

#

i dunno

#

config file

#

needs deletion

livid lake
#

oh I found why it's crashing btw

#

it throws a RuntimeException in the mixin, if the connection doesn't form within 15 seconds

lofty timber
#

yes

#

if you pull again

#

that

#

and a few other fixes

#

are already there

livid lake
#

alright cool πŸ™‚ gonna try it 1sec

lofty timber
#

ye

#

also i maybe should just

#

let the server close down

#

and not

#

kill the whole game

livid lake
#

I can't do it in time XD... rip lol

#

im too slow :P

#

the 15000ms just crashes my game before I can connect in time lol

lofty timber
#

well you didnt pull it again

#

i put 150000

#

now pushed even more fixse

#

did you repull it?

#

from github

livid lake
#

yeah I did, let me double check if it updated yet

lofty timber
#

you will se

#

if that number has a 0 more to it

livid lake
#

where'd the lan screen mixin go, btw?

lofty timber
#

its gone

livid lake
#

oh alr

lofty timber
#

banished to the shadow realm

livid lake
#

lol

lofty timber
#

because gole now starts

#

once leaving the p2p screen

#

otherwies you couldnt be a client

livid lake
#

btw, on the off chance have you worked with private/public keys before?

lofty timber
#

shameless plug

livid lake
#

nice!

lofty timber
livid lake
#

testing again yeah

lofty timber
#

ok

#

praying to god

#

even though i do not believe in a god, but for this i need one

#

atleast on windows, gole tries to connect to somewhere

#

but fails because he has no parttner

livid lake
#

alright and uh

#

for the client, do I join on 25565 or?

lofty timber
#

whatever it prints in the console of the client

#

the console should have a message like dis: System.out.println("Connection established!\n\nWaiting for you to join @ 127.0.0.1:" + gamePort);

#

with the client, you join that adress

livid lake
#

alright so

#

looks like I can't run the client and server on the same pc atm lol

#

as they'd both use 25565

#

I'm gonna boot up my windows remote desktop

#

shadoooow pc time!

lofty timber
#

they should not do that

#

or i think that should not happen

livid lake
#

in my code I make the server run 25565, and the client joins on 35585

#

since well, it's a little easier to get custom ports going for the client than the server

lofty timber
#

in my code, port 1 and port 2 are

#

65566
65565

livid lake
#

right... but the forwarded address seems to be 25565 in both cases

lofty timber
#

huh

#

dafuq

#

well ig test with a shadow pc

#

and see what happens

#

oh fuck

#

found the error

#

hol on

#

@livid lake time for a repull

vapid plaza
lofty timber
#

fixed that issue

#

it didint complain

#

fixed

#

deflecto one last repost

#

it should now work

livid lake
#

alr πŸ™‚

lofty timber
#

because this is as close to your impl as i can get

#

i am actually curious

#

if this will work

#

prob not tho

livid lake
#

Didn't work for me on 25565 mac + 25565 windows atm...

But this is really close, and these are all probably small bugs that can be easily fixed

Your code overall works remarkably well πŸ™‚

lofty timber
livid lake
#

I recommend testing with the IP address 127.0.0.1 on two alt accounts, same pc, and if you can get it to work on there, it should work soon for everybody else

livid lake
lofty timber
livid lake
#

oof

livid lake
lofty timber
#

ok

livid lake
#

think it was 29137->29138

lofty timber
#

a bit

livid lake
#

I'm making a system which won't require servers to type in players' ips

#

instead, the player and server connect to a Nexus

#

they both use DSA to prove their identities to eachother (so a troll can't host a server with the same id)

#

then all that needs to happen is:

  1. server starts
  2. server gets a public ID
  3. client joins via public ID
#

my old repository named friendjoin does it if you wanna tear it apart and take a closer look πŸ™‚

I'll be making a repo for a library that lets you do it in Java for any application πŸ™‚ Mostly for this project, but also for anyone else who needs it!

#

oh right now even, this version uses random IDs lol

#

they get a temporary id the minute they connect to the nexus

#

that's even easier to do

lofty timber
#

ok well

#

it seems the hole punching works

#

but

#

its refusing any connection

livid lake
#

yeah same for me

vapid plaza
lofty timber
livid lake
lofty timber
#

why it refuses a connection for me

livid lake
vapid plaza
#

idk i havent looked at any code yet

#

just vaguely stalking this channel to not get too far behind on the conversation

lofty timber
#

it is essentially the same as his code we managed to get to work

livid lake
lofty timber
#

but for me refuses to

livid lake
lofty timber
livid lake
# livid lake

like here it just stopped punching holes and didn't finish, idk why

#

I gtg but I'll be back in an hour, also will be back at the same time tmr

lofty timber
#

ima sleep then

#

already the next day for me

livid lake
#

great job on this man! it's really impressive and so close to working just how you intended πŸ™‚

#

oh lol. good night!

lofty timber
#

ima cry rn

#

i do not know why this doesnt work

#

like it says all the things i need it to

#

like, it does smth

#

my ip is just redacted outa there, all the x.x.x.x are my ip

#

Or am I blind and mentally challenged at the same time?

#

It can't be my nat because my nat is predictable

#

Which four griffins can prove

#

I am slowly but surely going mentally insane

lofty timber
#

Oh but I think I know why it refuses to work

#

A it hates me

#

And B because I am dumb

#

Gotta fix that later

swift lance
lofty timber
#

well it isnt a lie

lofty timber
#

and doubt this is revolutionary

#

ima leave this picture here, if someone does not know how this works

#

which intern relies on this

#

a and b beeing thr clients nat

lofty timber
lofty timber
#

so this mod will be a pain in the ass reliably wise

#

could also try to implement UPnP, but thats a huge security risk

lofty timber
#

me atm

lofty timber
#

@livid lake @vapid plaza the code currently online works

#

In the dev env the servers communicate

#

I cannot completely join as the Mojang servers cry around

#

But they communicate into the login phase

#

So this mod works

#

Just, need to do some polishing and using non blocking io

lofty timber
#

Some more changes, fixes and QOL changes

#

This is now in a, surprisingly usable state

lofty timber
#

@livid lake I summon you

#

Test dis

vapid plaza
#

@lofty timber lmk when you have 5 minutes to test something in vc

#

i have something that may or may not work

vapid plaza
#

i wanna test with your router specifically cause ik it returns connection refused packets

vapid plaza
#

we have done the first successful test of TCP hole punching in pure java

#

its very fragile, but i now have a working PoC that i can use to make something more advanced

lofty timber
#

And i have finished the implementation of the mod

#

it is tested

#

it works

#

i just need to finish some minor details

#

functionality wise tho, its done

#

i just need a guinea pig later that has a different nat than me and four griffins

#

because i know my nat is a nicer one

#

@vapid plaza you up to test the mod?

vapid plaza
#

in 5 mins

lofty timber
#

ok chief

lofty timber
#

we may or may not

#

have gotten it to work

spiral pagoda
#

this is quite exciting

lofty timber
#

zero lag

#

and it works

spiral pagoda
#

right, cause once connected, it’s just a regular tcp connection right?

lofty timber
#

when connecting the first time it just sends a borked error with random html request in it

#

but second connection attempt works like a charm

spiral pagoda
#

amazing

lofty timber
#

shit is three mixins

#

one is optional

#

and the other two are only gui shinanigans

#

currently, only one connection at a time is supported

#

i just need to move buttons from a menu to another

swift lance
#

For the actual p2p stuff??

lofty timber
#

nope

#

not one mixin

#

that actually touches networking code

vapid plaza
#

the actual networking is currently done with an external tool

#

im working on a java version that could be implemented as mixins, but its not required to work

lofty timber
#

that completely works without touching mc internals lol

vapid plaza
#

the mod already works

lofty timber
#

and, atm its 1 player to one player

#

i am currently reworking it to support x players to 1 player

swift lance
#

That's insane.

lofty timber
#

which should theoretically work

#

but is not tested

#

but i know that 1 to 1 works

swift lance
#

So wait, does this mean only the gui is version-dependent?

lofty timber
#

as you saw on the screen

swift lance
#

😳

lofty timber
#

nothing else references minecraft

swift lance
#

Well, grats at a new spot at the top of Modrinth. You can claim your prize in a few months.

lofty timber
#

prob not

#

not many people wanna share their ips with one another

#

and besides the point, i do not think its that revolutionary or any good because it currently looks like shit

fleet falcon
#

It's your public ip anyways isn't it? No harm in that

lofty timber
#

people are still paranoid

vapid plaza
#

its not terrible, but many people are still afraid of sharing their ip

#

but its aimed at friends anyway so like, if youre not willing to share your ip to a friend you wouldnt have self hosted anyways

lofty timber
#

and god forbid that i download a .exe i linked the source code too lol

swift lance
vapid plaza
lofty timber
swift lance
#

Or at least windows smartscreen

vapid plaza
#

thats what the java native implementation will be for 🀷

#

which has also had successful tests already, i just need to learn how minecraft uses netty

swift lance
#

The tag tells you: to crash games lol

#

!!netty

hollow anchorBOT
#

If you're getting NoClassDefFoundError: io/netty/util/ResourceLeakDetector$Level when running your project:

  1. update to Loom 12 (usually declared in build.gradle)
  2. run gradle with --refresh-dependencies
vapid plaza
#

im probably just gonna steal some ideas from e4mc

#

they are doing a very similar thing after all

swift lance
#

It's not stealing if it's MIT

vapid plaza
#

exactly xd

#

oh i think e4mc is gpl actually

#

idk what licenses look like

lofty timber
#

And we're MIT so our mod is cool

#

@swift lance btw you can already compile and test it yourself

#

If you want to

vapid plaza
lofty timber
#

The current GitHub code is the good one

lofty timber
#

It is just inspiration

vapid plaza
#

exactly

spiral pagoda
#

i wonder if you’d be able to abstract this system away

#

with a friends list esque menu

#

cause like, if players don’t know they’re sharing their ip, they’re quite unlikely to care

#

loads of games use p2p connections without people knowing

vapid plaza
#

i was thinking of putting it all through base64 and calling it a "join code" or smth like that

#

the people who figure out its their ip in base64 are the people who understand its necessary anyway

lofty timber
#

That is

#

Quite smart

#

I'ma do thaz

#

but for that

#

ima first need to rework all of the gui code

#

my brain is having a stroke

lofty timber
#

this mod will be on modrinth

#

by this monday

#

hopefully

#

if i manage to find the time

spiral pagoda
#

i'd be down to help with testing btw

#

if needed

lofty timber
#

more nat

#

more good

spiral pagoda
#

indeed

#

i think my nat is also quite nice though

#

so i might not be able to add much

vapid plaza
#

its expected to not work in 4% of cases, and i have some ideas for those as well

#

but were probably gonna need a lot of testers before we run into that

#

so probably after it gets published and people start using it

lofty timber
#

nah

#

nats just

#

rolling the dice when choosing external ports

#

and not beeing predictable

swift lance
#

Ah

lofty timber
#

basically nats are assholes

lofty timber
vapid plaza
#

not to mention hole punching is significantly safer than port forwarding

lofty timber
#

well they do, but java handles that

vapid plaza
#

despite the scary sounding name

lofty timber
#

i am more scary than that

#

once i punch through the desk

#

when making guis

#

the current gui is pretty horrible

#

but

#

i will this this this weekend

#

and make x to 1

#

possible

lofty timber
#

i borked it

#

borked it again

lofty timber
#

@vapid plaza p2p mod fixed

#

for every new client

#

you just gotta put another ID

#

also done

vapid plaza
#

noice

lofty timber
#

@spiral pagoda you here to do some testin

#

or @vapid plaza you available?

spiral pagoda
#

im down

#

hows this work?

lofty timber
#

sure, lets head dev talk

#

if you wanna talk

#

atm you need to pull the repo

vapid plaza
#

im coming in a minute

#

we gotta test groups right

lofty timber
#

ooooo

#

ye we do

spiral pagoda
#

i'd rather not vc rn

lofty timber
#

unique port shinanigans

spiral pagoda
#

but send me the repo

lofty timber
#

compile

#

1.20.4 with latest loader and fapi

#

and wait in the main menu

spiral pagoda
#

alr

lofty timber
vapid plaza
#

youre gonna need to move the mod to a non-dev minecraft instance tho

lofty timber
#

because we need an authenthicated dev env

vapid plaza
#

or it complains about auth

spiral pagoda
#

yea i figured as much

lofty timber
#

well technically the request goes to the server

#

but it says, nooo

spiral pagoda
#

mfw no gradle wrapper

lofty timber
#

i forgorsmol

spiral pagoda
#

luckily intellij is smart

lofty timber
#

smarter than me apperantly

#

oh it is getting too late, i cant even write properly anymore

spiral pagoda
#

ait im in the main menu

#

new button i see

lofty timber
#

gimme a sec, ima give you my id once my server is online

spiral pagoda
#

Gole?

#

huh

lofty timber
#

yes

spiral pagoda
#

whats that for

lofty timber
#

that is what does the hole punching

#

for us

#

we are currently working on a pure java impl

#

this is written in go and shipped in a executable

spiral pagoda
#

ah gotcha

lofty timber
#

once its downloaded a gui opens

#

you gotta tell me your id

spiral pagoda
#

yup

lofty timber
#

and i gotta tell you mine

spiral pagoda
#

maybe a button to copy the id to clipboard would be good

lofty timber
#

ye, forgor

spiral pagoda
#

here you go lol

lofty timber
#

OTEuMzguMzUuMTc1 is my id

#

for the lower field you gotta put 1234, we just agree we two use 1234

spiral pagoda
#

oh i see

#

thats like a password type thing?

lofty timber
#

its just too ensure

spiral pagoda
#

i've activated it

lofty timber
#

we have individual ports

#

now click proceed

#

direct connect

#

ip is in there

spiral pagoda
#

proceed is unclickable rn

lofty timber
#

huh

#

ig my dev env killed some shit

#

exit there

#

we gonna use another id

#

oh shit

#

this version is bugged

#

gimme a sec, i am gonna add a copy button

#

yes

#

that what i forgor XD

#

my brain decided not to brain

vapid plaza
#

also maybe delete this after usage, it does contain someones ip xd

spiral pagoda
#

i mean i suppose

#

i personally dont care much about leaking my ip

#

but ill delete if you want

lofty timber
#

i could not be bothered less

#

if someone has my ip

#

why tf does java hate me copying to clipboard lol

#

java.awt.HeadlessException

spiral pagoda
#

poggus

lofty timber
#

@vapid plaza can you test together with @spiral pagoda

#

have something else to do

#

new code pushed

spiral pagoda
#

alr let me recompile

#

my id is OTQuMjEwLjUyLjU4

#

copy button works πŸ‘

vapid plaza
#

oh oop

#

im not at my pc rn

lofty timber
#

mine is launching rn

#

gimme a sec

vapid plaza
#

i can come test in like 10 minutes

lofty timber
#

mine is OTQuMjEwLjUyLjU4

#

we agree on port 6666

#

ok my game crashed

#

why tf

spiral pagoda
#

mine's fine

lofty timber
#

mine is not, prob my jre

spiral pagoda
#

the same as mine

lofty timber
#

because copy failed

#

second

#

OTEuMzguMzUuMTc

#

this is mine

#

id 6666

#

server is waiting for your request

spiral pagoda
#

trying now

#

not doing much?

lofty timber
#

well shit

#

why isnt this doing anything

spiral pagoda
#

hm

lofty timber
#

the ips line upn shit

#

well, why the hell does this work with griffins

#

we may have found our unreliable nat

spiral pagoda
#

might be worth noting that im behind a doubt nat actually

#

*double nat

lofty timber
spiral pagoda
#

in theory it should punch through that right?

lofty timber
#

oh wait

#

it says connection established

spiral pagoda
#

wait what

#

not for me?

lofty timber
#

huh

#

to whom did i connect and start a server too LOL

spiral pagoda
#

and the log just cleared

#

did it time out?

lofty timber
#

seems so

#

let us retry

spiral pagoda
#

its running

lofty timber
#

it broke

#

prob double nat

spiral pagoda
#

likely

#

i wonder if you'd be able to work around that

lofty timber
#

i do not know

#

@vapid plaza when can i summon you?

patent elbow
#

Beside that if NAT on first client is unfriendly, but the NAT of the second client is friendly hole punching should be possible.

lofty timber
#

predictable vs non predictable

#

i know for a fact mine is nice and predictable

patent elbow
#

So it is enough.

lofty timber
#

i wonder why this isnt working

patent elbow
#

But the remote client (not you) must connect first as your external IP and port is predictable.

lofty timber
#

because it worked today

#

@spiral pagoda wanna ytry again?

spiral pagoda
#

i mean sure

lofty timber
#

port 4444, our ids remain the same

#

say once you connected

spiral pagoda
#

its running in theory

vapid plaza
lofty timber
#

ig it hates me now

#

does not wanna work

#

gonna need to see tomorrow

#

gotta sleep

spiral pagoda
lofty timber
#

i think this mod tates me

#

hates

#

This code works when it wants to

#

And it is not that time

patent elbow
#

Maybe because you still rely on external port being the same as internal one.

vapid plaza
#

we already found out that kroks router does exactly that, and gole punches in both directions, so it should work

patent elbow
#

That makes things a lot easier.

#

It should work fine, maybe you have a bug in the implementation.

lofty timber
#

well, it worked today

#

hm

#

using my local pc it works

#

which is expected

lofty timber
#

if two people were to try and give me a result of it workes or not i would appreciate it ;D