Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.tw/irclogs/ Connected with DDNet's IRC channel, Matrix room and GitHub repositories — IRC: #ddnet on Quakenet | Matrix: #ddnet-developer:matrix.org GitHub: https://github.com/ddnet
Between 2020-08-03 00:00:00Z and 2020-08-04 00:00:00Z
Avatar
I really need help, I cannot seem to get the Secruity Token working for my 0.7 mod... I am even at that point where I cause client crashes while I try to connect :(
01:18
I would really appreciate if anyone could help me implement it, I know the logic behind it, heinrich told me the other day already, but I just cant get it to work...
01:24
also clients dont get inserted in network_conn::Feed instead in DirectInit? I just dont get how and why all is so different between the versions :/
Avatar
@fokkonaut which part does already work? do you see the CONNECT messages of the client in the server? the CONNECTACCEPT in the client? or even the ACCEPT in the server?
Avatar
07f18d4 Client: Support .map file drag-and-drop to open map in editor - def- abb7e7b Merge #2531 - bors[bot]
10:52
bf4008c Provide sqlite3.lib file - def- 6e6e51e Merge #2530 - bors[bot]
Avatar
@heinrich5991 my best result was that I got the connect and the accept from the client, tokens matching, but the weird part is that in ddnet the server tries to accept the client in the accept msg, and in 0.7 in the Connect msg which comes earlier from ddnet. So no matter what I tried, the best I could get was a "connecting" tee, but the client never rendered anything. I even caused client crashes xd. When i try to accept the client on the connect msg it doesnt work. maybe its because ddnets and 0.7 Recv() part is completely different, 0.7 doesnt have these OnTokenCtrlMsg etc. or TryAcceptClient... Also, I dont understand the part in network_conn.cpp::Feed, where the server is checking for the token (dbg msg: "generate token %d"). It doesnt get called at all? I am just lost trying to do this
Avatar
again there are too many maps in maptesting, so new maps can't be added, idk if i should post that here or soemwhere else (edited)
Avatar
@jao I guess?
Avatar
@fokkonaut try to debug the connection process step by step. try to send a token back with the CONNECTACCEPT, and check whether you get a response back from the client
Avatar
I obviously get, because the tokens match
Avatar
then continue with the next message. do you get the next message?
Avatar
which one is the next?
Avatar
how would one go about finding that out?
Avatar
i guess its the netmsg_info?
Avatar
I think so too
Avatar
no wait
15:01
in ddnet its the clientver thing
15:01
in preauth state
Avatar
oh yea, in new ddnet, true
Avatar
so i need to take care of that too?
Avatar
first you'd probably check whether the message even makes it to the relevant part of the server code
15:02
before trying anything further
15:03
always try small steps of things that definitely have to work
Avatar
yea but I think I will not finish this working anyways... And if I get it the code is really ugly
15:04
What do you use DirectInit for? why not the normal path using Feed(
15:04
)
15:04
I have too many questions
Avatar
you oculd treat it as a learning opportunity and try to understand the code
15:05
idk what DirectInit is either
Avatar
it initializes the netconnection witout going through Feed to check the msgs again etc
15:06
I should maybe structure the Recv() part of network_server the same as in ddnet
15:06
with all the functions and Slot
Avatar
the general code structure is relatively irrelevant if you understand what is sent over the network
Avatar
It's rather difficult to work with when the code structure doesn't match what's send over the network
15:17
sent*
Avatar
I disagree here
15:18
the protocol is trivial to describe, it should fit fine into any code base
15:18
it's just three messages and only the last one causes state to change
Avatar
eh, look at the mess that is the 0.7 compatibility
15:20
The token protocol of 0.7 doesn't match 0.6 at all and it sticks out like a sore thumb
Avatar
example?
15:22
and can you explain the difference between the 0.6 and the 0.7 protocol here?
15:22
0.6 sends CONNECT, CONNECTACCEPT, ACCEPT over the network
15:22
the 0.7 equivalent is TOKEN, TOKEN, CONNECT, CONNECTACCEPT <- okay, here's an extra step
15:23
but you only have to cut it short by one step for 0.6
15:23
if you start from 0.7
Avatar
Well the fact that detecting 0.7 requires us to unpack the message first makes it even worse
15:26
but take a look at network_server.cpp where we had to unpack the packet twice
Avatar
sounds like a problem with the code, not with the concept
15:27
I think I described how to do it with unpacking only once
15:28
by pattern matching unconnected messages against 0.7 TOKEN and CONNECT, and treating the rest of the unconnected messages as 0.6 (edited)
Avatar
It'd take some very clever restructuring of the code to get it to look nice
Avatar
not really
Avatar
the point stands, the code doesn't match the protocol so it's a PITA to work with
15:28
Pattern matching is hardly cute
Avatar
it's how e.g. the "ssh and https" on one port works
Avatar
(which is a very ugly thing imho)
Avatar
if you want to have it nice and clean you could do it on a second port
Avatar
At which point the code would match the protocol we are handling but we'd get a lot of duplicated code in return, to fix that you'd need to clean up CNetBase and CNetServer a fair bit
Avatar
otherwise something like pattern matching is practically required I think
15:31
what?
15:31
you can do the pattern matching very nicely
15:31
idk what you're talking about, it fits into the existing code. okay, call it unclean
Avatar
Feel free to implement it, it's open source after all
Avatar
why would I?
15:32
you just claimed some impossibility and I claim possibility and that means I have to implement something now?
Avatar
I couldn't get it in there in a way that didn't make it look out of place, neither could timakro come up with a cleaner way to do it
Avatar
I can do it in rust one day, when I wnat it there
Avatar
I never claimed an impossibility, I just said "It's rather difficult" and that the "code ends up ugly"
Avatar
would some pseudocode help?
Avatar
Just because I couldn't get it clean obviously doesn't mean it's impossible, though I'm flattered you think that highly of me
15:35
@heinrich5991 sure, don't make it too abstract though
Avatar
bonjour hello hi, is it possible to add a feature to ddnet demo playing? So that you can rewind the demo? Or a "jump back 10sec" button?
15:42
rewind= play backwards
Avatar
it already exists
15:44
left and right arrow
15:44
ty xD
15:44
but rewind not in the client, right?
15:45
oh is it possible to change the time that gets jumped by pressing the arrow? so I could maybe change from 5sec to 10sec
15:45
j and k for 10 sec
Avatar
playing the demo backwards
Avatar
playing a demo backwards is not supported
Avatar
or k and l
Avatar
alrighty :)) @Patiga plans to implement it?
Avatar
rewinding -> going to an earlier timestamp is supported
Avatar
i dont think its planned
Avatar
playing backwards could be a fun coding challange 😄
Avatar
@jao what is the bind for 5 or 10sec jump? or cant I bind it to another key?
Avatar
you could convert the demo and play the video backwards ^^
15:48
you can render a demo to mp4 in the client and play the video file backwards if that is your goal :)
Avatar
you cant rebind it
15:48
i think its j and k for 10s jumps
Avatar
@Patiga ah nono I just like to rewind videos to see again what happened xD just preference over jumping to a certain point. but doesnt matter that much
15:51
okay thank you :) 5 or 10sec jumps do that job just right. tyty
Avatar
That breaks the protocol extension
Avatar
[quakenet] ChillerDragon BOT 2020-08-03 17:29:39Z
send help @redix :D
Avatar
just remove ddnet7
Avatar
Well that can be fixed without breaking compatibility. Oy probably didn't think/care about mods
Avatar
Ofc not
17:40
Not even surprised
Avatar
68d3518 add louis - 12pm 955ff5c dont allow renames of banned names - 12pm
droguis 3
droguis 3
extremenouis 3
extremenouis 3
noouis 3
noouis 3
noouis 3
nouis 4
nouis 3
nouis 3
nouis 3
nouis 3
penouis 3
penouis 3
zoozuis 3
zoozuis 3
rect1840 3
poois 3
poois 3
poundis 3
Avatar
jao added nouis
Avatar
[quakenet] ChillerDragon BOT 2020-08-03 20:34:49Z
eh i always thought a bad harddrive means slow io ops but stuff like typing should be fast. but if the os is on a slow driver ervythign is slow huh?
20:35
i have like 10 fps while typing in my gnome terminal on tha old hdd i found in my basement xd
Avatar
isnt typing input
Exported 114 message(s)