To actually use the client with a private server, you will need to patch it, and I would recommend using dnSpy for that.
Also, most of the clients are obfuscated. Please look at the section below on how to patch them.
If your version of osu! is below b20130815, you will have to patch the Bancho IP, to use the Bancho service.
You will need to find a line inside osu.Online.BanchoClient
that looks something like this:
and edit the ip address to match your setup:
And lastly you need to patch every url in dnSpy, from ppy.sh
to match your domain:
However, this can be a bit annoying.
You can alternatively use a server switcher, like ultimate-osu-server-switcher to skip this part
Clients are obfuscated most of the time, which means that function names, class names, etc. are not readable anymore:
If you attempt to edit the methods anyways, the decompiler will probably give you some errors.
You can fix these issues using the de4dot deobfuscator. You can download one of the pre-built binaries here. Example:
de4dot "osu!.exe"
The program will output a osu!-cleaned.exe
file, which you can edit again.
Keep in mind that the function & class names are still not readable.
Most clients past 2015-2016 are obfuscated using Eazfuscator. I haven't been able to find a good way to deobfuscate these clients correctly, without running into crashes. I would recommend looking at the repositories from holly, since they provide some very useful resources for it.