Ørb# (Orb Sharp) Development Log
- Flake
- VFA-49
- Posts: 4375
- Joined: Thu Feb 10, 2011 8:47 pm
- Favorite Aircraft: Boeing F/A-18A
- Location: Australia
- OS: Windows 10 (x64)
- Has thanked: 861 times
- Been thanked: 1279 times
- Contact:
Re: [0.3.2]Orb: YSFlight Proxy Server Script
With the current project organisation, I was able to reorient myself with the project and pick back up to work on what I needed in less then 5 minutes. Organisation really pays off huh?
I've now got the permissions sub object linked with groups, ranks and users. It's all pretty well organised, which I am quite pleased with.
IF you look at the checklist, next is "permissions core" which tests permissions and decides if functions can be performed or not. I've already done a pseudo checklist for it so it seems to be in good order, i just need to change the pseudo code to c# working code, shouldn't take long.
The big problem I see is permissions core is very complex and a very big security feature. because of its complexity, I need to be sure that there are no security loopholes for server users... This will be checked in Orb C# Release Candidate.
After that, I need to do the packet sniffer which, with soji's help and previous packet sniffing experience with python orb, should be a cake walk.
IF I can keep up my current rate of progress, orb will be fully ported to c# in about a month.
Please forgive that the checklist is not updated to reflect the completion of permissions database object, no photoshop on this pc, will be corrected later.
SO in summary: Next is permissions core, then packet host then proxy service... then I roll out release candidate 1.0 for bug checking, and then we can use the first version of orb stably on servers.
EDIT: Had a look into Double.PositiveInfinity and Double.NegativeInfinity. This will help with permissions core flow, as -inf will be "NO" and negativeinf + positiveinf = NaN, which I can also just play off as "eh, i guess it must be NO then." as it should be, as that's the only REAL way a NaN can occur. accordingly: <1 = no, -inf = NO, NaN = NO, +inf + yes. This will work perfectly, as it will be a line by line test now rather then nested ifs, much safer and faster too.
The reason I'm doing this is to control power effectively. consider a banned user in the admin group. they have the power to do all admin functions, but if I set the banned group to have -inf (FALSE) for all permissions, that will override and they won't be able to do anything. IF an admin is stupid enough to assign themselves a bugged group, the server owner will physically need to edit the database to fix their stupidity, or another admin will need to fix it for them. This is the same sort of permissions system that fcraft for minecraft classic uses, and, in my experience, this is the best and safest/smartest way to do it.
- Flake
- VFA-49
- Posts: 4375
- Joined: Thu Feb 10, 2011 8:47 pm
- Favorite Aircraft: Boeing F/A-18A
- Location: Australia
- OS: Windows 10 (x64)
- Has thanked: 861 times
- Been thanked: 1279 times
- Contact:
Re: [0.3.2]Orb: YSFlight Proxy Server Script
That's enough for today, We're now ready to start the proxy side of the program!
- Flake
- VFA-49
- Posts: 4375
- Joined: Thu Feb 10, 2011 8:47 pm
- Favorite Aircraft: Boeing F/A-18A
- Location: Australia
- OS: Windows 10 (x64)
- Has thanked: 861 times
- Been thanked: 1279 times
- Contact:
Re: [0.3.2]Orb: YSFlight Proxy Server Script
Cleaning up a lot of old code to use events which is much cleaner then variables with while loops suspending every 100 ms or so to test. I LOVE EVENTS!
As C# is the first language I've ever used that had them, i had to learn what the hell they are and i have to say, worth the investment.
made gui and console work more the way i want them too, and now I have an input structure for the gui to send commands to the main thread, and vica versa.
This will be mandatory in the testing stages.
EDIT: You know, i just realised that I'm flying blind when it comes to the packet organisation...
As it stands, I have the packet object (a byte array), and packet data objects (size, type, data). But i think I will add a packet type object for each type as vincentweb did for YSPS. with that I can do Type1Packet.Username or Type1Packet.ToPacket(); (would give me a byte array packet ready to send) or even Type1Packet.ToPacketData(); (size, type, data). The functions would be standard to all packet types, with specific values being properties to the packets. this will keep me on track! Something to rack my brain over as I get organised for the next stage of development.
- wingzfan99
- Core Staff
- Posts: 692
- Joined: Thu Feb 10, 2011 8:03 pm
- Favorite Aircraft: Boeing 757-200
- Location: Chicago, Illinois
- Has thanked: 49 times
- Been thanked: 55 times
- Contact:
Re: [0.3.2]Orb: YSFlight Proxy Server Script
Consider using inherited classes or interfaces for this. It really keeps the code clean and makes it way easier to add more features later on.OfficerFlake wrote: As it stands, I have the packet object (a byte array), and packet data objects (size, type, data). But i think I will add a packet type object for each type as vincentweb did for YSPS. with that I can do Type1Packet.Username or Type1Packet.ToPacket(); (would give me a byte array packet ready to send) or even Type1Packet.ToPacketData(); (size, type, data). The functions would be standard to all packet types, with specific values being properties to the packets. this will keep me on track! Something to rack my brain over as I get organised for the next stage of development.
Treasurer, YSFHQ
Founder and Admin of the site once known as YSUpload
- Flake
- VFA-49
- Posts: 4375
- Joined: Thu Feb 10, 2011 8:47 pm
- Favorite Aircraft: Boeing F/A-18A
- Location: Australia
- OS: Windows 10 (x64)
- Has thanked: 861 times
- Been thanked: 1279 times
- Contact:
Re: [0.3.2]Orb: YSFlight Proxy Server Script
They'll all be sharing a common class though for the conversion functions (- specialised types, as each packet generation will obviously be unique to the type)
- Flake
- VFA-49
- Posts: 4375
- Joined: Thu Feb 10, 2011 8:47 pm
- Favorite Aircraft: Boeing F/A-18A
- Location: Australia
- OS: Windows 10 (x64)
- Has thanked: 861 times
- Been thanked: 1279 times
- Contact:
Re: [0.3.2]Orb: YSFlight Proxy Server Script
Reworked the netcode class structure.
Before, it went like this:
- Start listening for clients
- Get a new client
- Create a new client object for it and listen again.
- do login stuff and etc.
- Create the host object (controls data sent and received from host.
- tell host to start sending/receiving
- start sending receiving itself.
I changed it today to go:
- Start listening for clients
- get a new client
- create a container object for the client.
- create a client object for that connection
- create a host object for that connection
- initialise both the client and host
- start both the client and host talking to each other.
Now, I can just have a Orb.Server.NetObject.Client.ProcessPacket(Packet ThisPacket) rather then something like Network.Packets.Processpacket(Socket InSocket, Socket Outsocket, Packet ThisPacket) etc. etc.
It keeps things more organised and it's a lot easier to imagine the structure each object takes.
Having an issue at current in regards to clients not closing cleanly. I need to look further into my receive and subsequent close functions to be sure this is all okay.
First step of packet processing is working tops though. Using a Switch/Case structure to handle each packet type, and in turn, separate functions to handle the conversion of raw packets to specialised packets with easily extractable data. It makes the processpacket.cs code a lot cleaner and easier to manage.
Tomorrow or later, I'll look at the close function for the clients, and get that sorted out, and I'll look at the other packets in the order that come to YSF. I'm aiming to create my own server, by testing packet by packet rather then rely on proxy.
I want to share my dropbox in a read only format... I need to figure that out too.
- Flake
- VFA-49
- Posts: 4375
- Joined: Thu Feb 10, 2011 8:47 pm
- Favorite Aircraft: Boeing F/A-18A
- Location: Australia
- OS: Windows 10 (x64)
- Has thanked: 861 times
- Been thanked: 1279 times
- Contact:
Re: [0.3.2]Orb: YSFlight Proxy Server Script
I may consider taking the time to learn subversion and share that way, but looks like you'll need to get updated source by request only.
I am of course, happy to share this project with anyone (but please don't go and make runaway projects with it, I've poured a lot of hard work into this!) You will need Visual Studio or an appropriate development environment (I acquired VS legally of course, it only cost me a thousand bucks but totally worth it for a small project.)
Here's the source: Download! or if that don't work, try this one: Alternate Download
- Flake
- VFA-49
- Posts: 4375
- Joined: Thu Feb 10, 2011 8:47 pm
- Favorite Aircraft: Boeing F/A-18A
- Location: Australia
- OS: Windows 10 (x64)
- Has thanked: 861 times
- Been thanked: 1279 times
- Contact:
Re: [0.3.2]Orb: YSFlight Proxy Server Script
After that, it's the same old: basic admin commands like mute, kick, ban, and basic user info tracking, then we'll start on release candidate and look for errors.
EDIT: Orb will also get a name change to "Orb #" (Orb Sharp). Call it orb of course for simplicity. I think Release candidate will be ready in a months time or less at this rate. The majorty of structural development is now out of the way.
- Flake
- VFA-49
- Posts: 4375
- Joined: Thu Feb 10, 2011 8:47 pm
- Favorite Aircraft: Boeing F/A-18A
- Location: Australia
- OS: Windows 10 (x64)
- Has thanked: 861 times
- Been thanked: 1279 times
- Contact:
Re: [0.3.2]Orb: YSFlight Proxy Server Script
I was looking for packets that have a size of "0" to be a signal to check if a socket is closed. Matter of fact, new packet object will never return anything less then 4 (the size of a type byte array).
Changed that to type 0 instead (never used). it helped but was still getting errors. Changed my final check to close a socket to be if x || y is closed, rather then &&. The ysflight sockets don't close at the same time, as this is working in proxy mode. only one end will close, I have to close the other. Seems quite reliable now, and always disconnects even if I force close YSF or exit gracefully.
Onto packet sniffing for the evening
- Flake
- VFA-49
- Posts: 4375
- Joined: Thu Feb 10, 2011 8:47 pm
- Favorite Aircraft: Boeing F/A-18A
- Location: Australia
- OS: Windows 10 (x64)
- Has thanked: 861 times
- Been thanked: 1279 times
- Contact:
Re: [0.3.2]Orb: YSFlight Proxy Server Script
Tackling packet types one by one in the log in process.
Also, just learned the wonder of extension methods, so doing away with Network.Packet.PacketToBytes(ThisPacket) and instead doing ThisPacket.Serialise() and other much easier things, makes the code easier to look at.
Using a common packet for basic packet ops now for all specialised types such as size.
- Flake
- VFA-49
- Posts: 4375
- Joined: Thu Feb 10, 2011 8:47 pm
- Favorite Aircraft: Boeing F/A-18A
- Location: Australia
- OS: Windows 10 (x64)
- Has thanked: 861 times
- Been thanked: 1279 times
- Contact:
Re: [0.3.2]Orb: YSFlight Proxy Server Script
Here's how thing are at current. I'm just reading and sorting packets from the client at this stage. The packet above is an aircraft list packet.
After that aircraft list packet, it's final login packet and ground objects, and then I have the client side of the login mapped.
- Flake
- VFA-49
- Posts: 4375
- Joined: Thu Feb 10, 2011 8:47 pm
- Favorite Aircraft: Boeing F/A-18A
- Location: Australia
- OS: Windows 10 (x64)
- Has thanked: 861 times
- Been thanked: 1279 times
- Contact:
Re: [0.3.2]Orb: YSFlight Proxy Server Script
Now working on interpreting chat messages from the client.
- Flake
- VFA-49
- Posts: 4375
- Joined: Thu Feb 10, 2011 8:47 pm
- Favorite Aircraft: Boeing F/A-18A
- Location: Australia
- OS: Windows 10 (x64)
- Has thanked: 861 times
- Been thanked: 1279 times
- Contact:
Re: [0.3.2]Orb: YSFlight Proxy Server Script
The sevvice held up perfectly well, despite my computer lagging like it was on fire from the ammount of YSF's I had open.
The very first test of Packet editing is taking place with Type32 (chat) now being edited into the signature "orb" message format.
- Flake
- VFA-49
- Posts: 4375
- Joined: Thu Feb 10, 2011 8:47 pm
- Favorite Aircraft: Boeing F/A-18A
- Location: Australia
- OS: Windows 10 (x64)
- Has thanked: 861 times
- Been thanked: 1279 times
- Contact:
Re: [0.3.2]Orb: YSFlight Proxy Server Script
- Ray
- Contributor
- Posts: 100
- Joined: Mon Aug 27, 2012 6:47 pm
- Favorite Aircraft: F22 Raptor
- Location: United Kingdom
- Been thanked: 1 time
Re: [0.3.2]Orb: YSFlight Proxy Server Script
Keep up the good work Flake!
I'll add Orb to the next newsletter
- Flake
- VFA-49
- Posts: 4375
- Joined: Thu Feb 10, 2011 8:47 pm
- Favorite Aircraft: Boeing F/A-18A
- Location: Australia
- OS: Windows 10 (x64)
- Has thanked: 861 times
- Been thanked: 1279 times
- Contact:
Re: Ø# (Orb Sharp) Development Log
As you might have heard, my computer fragged itself recently, so I just finished re-installing windows, and now am getting my development environment back up again.
Dropbox has done it's job, again and again and again. Orb code files have been restored from the online backup. Visual Studio Ultimate is being installed right now, ready to pick back up work.
The next week will now consist of getting windows, itunes, ysflight, teamspeak, VAC all ready for VNAF Airfest in a fortnights time.
After that, it's back to work on the project.
- Flake
- VFA-49
- Posts: 4375
- Joined: Thu Feb 10, 2011 8:47 pm
- Favorite Aircraft: Boeing F/A-18A
- Location: Australia
- OS: Windows 10 (x64)
- Has thanked: 861 times
- Been thanked: 1279 times
- Contact:
Re: Ørb# (Orb Sharp) Development Log
As an aside: Today I've purchased a new helmet, visors, gloves, boots, and track racing leathers for my motorcycling... Take a guess what I'll be getting up to soon.
More packets being identified. Type 7 is actually smoke color. I thought it was acknowledge option... derrrr. It makes so much sense now. That's being implemented. Skipping over the type 11 at current (flight data) I'll build that one last. About to start work on type 8 (join request).
I also learned a little something: the server can force and aircraft do unjoin by sending a remove aircraft packet. That's pretty cool, as now I can make things more direct in regards to kick user, force damage etc. etc.
- wingzfan99
- Core Staff
- Posts: 692
- Joined: Thu Feb 10, 2011 8:03 pm
- Favorite Aircraft: Boeing 757-200
- Location: Chicago, Illinois
- Has thanked: 49 times
- Been thanked: 55 times
- Contact:
Re: Ørb# (Orb Sharp) Development Log
Treasurer, YSFHQ
Founder and Admin of the site once known as YSUpload
- Flake
- VFA-49
- Posts: 4375
- Joined: Thu Feb 10, 2011 8:47 pm
- Favorite Aircraft: Boeing F/A-18A
- Location: Australia
- OS: Windows 10 (x64)
- Has thanked: 861 times
- Been thanked: 1279 times
- Contact:
Re: Ørb# (Orb Sharp) Development Log
Such a fucking shame, I thought I could trust people with this. No new public releases will be released, only private to those whom join a group I will set up later.
To whomever is the mad cunt, grow up dickhead, you're ruining a good thing for everyone.
- Varren
- Banned
- Posts: 453
- Joined: Wed Mar 06, 2013 6:31 pm
- Favorite Aircraft: Anything with wings.
- Has thanked: 19 times
- Been thanked: 45 times
Re: Ørb# (Orb Sharp) Development Log
Confirmed for Fanjet.OfficerFlake wrote:To whomever is the mad cunt, grow up dickhead, you're ruining a good thing for everyone.
Who is online
Users browsing this forum: Ahrefs [Bot] and 14 guests