namikiri / iserverd

An attempt to build the iserverd on an x86_64 machine
Other
7 stars 2 forks source link

Is it actually working? #1

Open 82MHz opened 11 months ago

82MHz commented 11 months ago

Hi, very cool project! I tried building iserverd in the past, but never had any luck with it... Do you actually have it running, so an ICQ client can connect to it? I could build it fine under debian, but have not yet tried to fire it up...

namikiri commented 11 months ago

Hello and thank you for your interest!

I was building it on Ubuntu 22.04. The code passes build with lots of warnings but the binary runs well without segfaults. It opens the 5190 port, establishes the PostgreSQL connection and creates the tables it needs.

I couldn't connect to the server with Jimm and QIP clients, didn't try other though.

tcpdump shows some socket activity on the 5190 por, both from client and server but the clients I tried just hang up on "Connecting" state. The logs show nothing. I didn't debug that and probably my configuration is wrong.

82MHz commented 11 months ago

Hi! I am stuck at the same step you are. I still have made some progress...

I found the documentation for the project on archive.org: https://web.archive.org/web/20060208071528/http://iserverd.khstu.ru/

From looking around there for a bit I figured out the the actual ICQ protocol (called OSCAR) is called v7 protocol inside iserverd.

So the iserverd config file v7_proto.conf is interesting to us, and there we have to add the real network interface IP address to the line V7 BOS address

Also we need to set V7 registration enabled to YES. This is explained in the config file itself.

In the file iserv.conf at minimumInfo Passwordand database password need to be changed.

However, it still does not work, I got stuck at the same spot you are.

I figured out though that by running the script icquser, which if you did the local install to /usr/local is located in /usr/local/etc/db, you can add a new user with a new ICQ number, like this: $ sudo -u postgres ./icquser add <UIN>

However then if you run $ sudo -u postgres ./icquser search <UIN>

it says that the User with this UIN (ICQ number) cannot be found. So no database entry was created, even though it should have been.

I would conclude from this that the communication with the database doesn't work right, maybe the postgres interface has changed in the years since iserverd was last updated.

If this is correct, then this means that we would have to change the iserverd code to get database accesses working :(

All is not lost though, because I installed a VM with Ubuntu 4.10 and installed postgres and iserverd in there, configured it like I said above, and lo and behold, it worked!

So you can run your own ICQ server, but you need to do it in the appropriated OS inside a VM.

namikiri commented 11 months ago

Oh cool! Thank you for your research. I'll try that and if I get at least authentication error instead of silence I probably will try to find out what's happening with the database. Btw I was using PostgreSQL 12 to build and run iserverd. It was connecting successfully but ./icquser add didn't work for me neither and I just tried to add a new user directly with SQL query.

82MHz commented 11 months ago

I tried postgresql 14, that's the one that came with Ubuntu by default. The old Ubuntu is running postgresql 7.4.

./icquser is a bash script, you can look into it and see the psql calls, just in case you didn't know. That's why I'm guessing the sql calls don't work with the new version anymore.

The configure script for iserverd can also be called with the option --with-debug, then the server should produce a debug log file, though it didn't in my case, I'm not sure why...

I have no clue about databases unfortunately, so it would take me quite some time to dig into that, but if you need any help debugging or testing feel free to get in touch!

namikiri commented 10 months ago

Just tried configuring the iserverd as you told and got the same problem. Well, I'll try debug build and to find out what's blocking the connection

0x0000beef commented 4 months ago

As far as I remember, earlier vanilla iserverd compiled and ran successfully in x32 ubuntu, but under x86_64, ICQ didn't work and it seemed to have exactly these symptoms: no connection/stuck. The problem (I think) was in 64-bit, additional bytes were written somewhere in the protocol or something like that (unfortunately, I am not a programmer). I compiled with different parameters/keys/etc on a 64-bit system and nothing worked. Under x32 I still have a two-year old VM with which everything loads and works, but againg it's just vanilla.

Proof of work: https://a.uguu.se/EGGpQqRD.mp4

Ubuntu: Linux ubuntu 4.13.0-21-generic #24-Ubuntu SMP Mon Dec 18 17:29:35 UTC 2017 i686 athlon i686 GNU/Linux

Maybe that's the problem, maybe not, but just for your information :)

82MHz commented 4 months ago

That's interesting, I hadn't considered that it might be a 32/64 bit issue. But it makes sense...

Can I ask, which Linux distro are you running it on? An old one, or one of the current still existing 32 bit distros?

Also, are you actively using the server, or just playing around?

Am 29. Mai 2024 20:19:46 MESZ schrieb ItoHito @.***>:

As far as I remember, earlier vanilla iserverd compiled and ran successfully in x32 ubuntu, but under x86_64, ICQ didn't work and it seemed to have exactly these symptoms: no connection/stuck. The problem (I think) was in 64-bit, additional bytes were written somewhere in the protocol or something like that (unfortunately, I am not a programmer). I compiled with different parameters/keys/etc on a 64-bit system and nothing worked. Under x32 I still have a two-year old VM with which everything loads and works, but againg it's just vanilla.

Proof of work: https://a.uguu.se/EGGpQqRD.mp4

Ubuntu: Linux ubuntu 4.13.0-21-generic #24-Ubuntu SMP Mon Dec 18 17:29:35 UTC 2017 i686 athlon i686 GNU/Linux

Maybe that's the problem, maybe not, but just for your information :)

-- Reply to this email directly or view it on GitHub: https://github.com/namikiri/iserverd/issues/1#issuecomment-2138007401 You are receiving this because you authored the thread.

Message ID: @.***>

0x0000beef commented 4 months ago

which Linux distro are you running it on?

The VMWare setup specifies ubuntu-17.10.1-server-i386.iso, I can't remember why this particular version, lol. PG version = 9.6.

just playing around

This. It was New Year's Eve and I was overcome with nostalgia (and just in case I didn't delete the virtual machine, because even then I felt that it would not be easy to do it again).

By the way, a long time ago, a predecessor of mine had already tried to go down this road, and he also got stuck somewhere at this point. On the official support forum there is a thread where this person makes a guess about the bug, but he was not an experienced IT guy either and it's just a guess: https://sourceforge.net/p/iserverd/discussion/680227/thread/eac83207/

Since I am not a programmer I was not able to make it work. What I did: New config so that it works and understands 64-bit platform. I wrote all the paths to 64-bit postgre libraries. I made some corrections in contacts_db.cpp and lex.yy.c so that no errors would pop up during the build. All this stuff is assembled but it doesn't want to work, it warns that the protocol is null. Apparently it is because in the protocol part longs are used and in the 64-bit version they have size 64 instead of 32.

So, that's all we have. Hope it helps somehow.

82MHz commented 4 months ago

My reason is the same - pure nostalgia. Used to love ICQ back in the day, and I'm still longing occasionally for the time when I had a Windows 98 PC with a Voodoo graphics card, listened to music on Winamp and texted through the night with my friends.

I'd love to set up my own ICQ server, but realistically none of my IRL friends care about this stuff now that we're in our 40s, and I wouldn't dare opening something like this up to the internet...

There are however projects that aim to revive the old services, ICQ, AIM, MSN and such. I've collected a few links for a blog post, I'll link it here when it's published.

0x0000beef commented 4 months ago

I know how you feel!

I have two people in my contact list with whom we communicate in ICQ until now. But now, since June 26th VK is completely killing the service and I was wondering again if someone has implemented something newer than what was already there in 2010s. Yes, there are guys in Discord who are alpha-beta-launching their MSN-WLM-OSCAR-ICQ-AOL-whatever, but that's someone and somewhere, and I still want my own, you know.

Glad to find this repo and see someone who has progressed far enough. It's an important part of history, an entire life for some, it's a digital legacy after all.

I hope that if not a full-fledged port for x64, then at least realization, for example, in the form of i386/686 docker or maybe chroot with instructions and all proper ports, etc., someone nostalgic enough will be able to do it. Surely with modern tools it can be containerized in some form. I am unfortunately not qualified to do this and can only guess the direction of travel.

kkula9999 commented 4 months ago

cant believe there is update comment on iserverd ICQ server, i built a server based on v2.5.5, its works fine if registered with the script, but I got UIN 0 if registered with ICQ application (2000-2003b), any conf file i needed to be focus on?

82MHz commented 4 months ago

Hm, I never tried registering with the application...

Out of curiosity, what OS are you running your server on?

On 31.05.24 08:05, kkula9999 wrote:

cant believe there is update comment on iserverd ICQ server, i built a server based on v2.5.5, its works fine if registered with the script, but I got UIN 0 if registered with ICQ application (2000-2003b),

— Reply to this email directly, view it on GitHub https://github.com/namikiri/iserverd/issues/1#issuecomment-2141292020, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3YJBDPVCSJBSUQ6UVCFGTZFAHMFAVCNFSM6AAAAAA7E75M46VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBRGI4TEMBSGA. You are receiving this because you authored the thread.Message ID: @.***>

82MHz commented 4 months ago

@0x0000beef I can totally relate to wanting a server under your own control, that's also what I'm looking for.

If it is and stays 32 bits only then using docker will probably not be possible as docker is using the host os's kernel, so I imagine iserverd would have the same problems there as on a native 64 bit system.

82MHz commented 4 months ago

I collected a few resources here: https://82mhz.net/thoughts/linkdump-no-7/

0x0000beef commented 4 months ago

@82MHz maybe, maybe not. Intuition says that there is a solution, just need to think properly.

P.S. web.icq.com will also be down on June 26 with main backend services.

82MHz commented 4 months ago

If you're a good programmer and have the time and energy to really look into it, there is for sure a solution.

But for me, if I can get it working in a 32 bit VM, that's probably good enough. Though I agree, having a docker container that you just have to fire up would be very nice. Maybe also without the need for a big postgresql database....

There's this project (https://github.com/ox/aim-oscar-server) that reimplements an AIM server. That should be very similar to ICQ, maybe it's possible to extend that to support ICQ as well, but I haven't looked into it yet and the developer doesn't seem interested...

Let's wait for ChatGPT 5 to be released and then we can just ask it to write us a new ICQ server ;)

kkula9999 commented 4 months ago

Hm, I never tried registering with the application... Out of curiosity, what OS are you running your server on? On 31.05.24 08:05, kkula9999 wrote: cant believe there is update comment on iserverd ICQ server, i built a server based on v2.5.5, its works fine if registered with the script, but I got UIN 0 if registered with ICQ application (2000-2003b), — Reply to this email directly, view it on GitHub <#1 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3YJBDPVCSJBSUQ6UVCFGTZFAHMFAVCNFSM6AAAAAA7E75M46VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBRGI4TEMBSGA. You are receiving this because you authored the thread.Message ID: @.***>

currently using redhat 9 (not rhel) coz some recommended rpm compatiable issue,

kkula9999 commented 4 months ago

Hm, I never tried registering with the application... Out of curiosity, what OS are you running your server on? On 31.05.24 08:05, kkula9999 wrote: cant believe there is update comment on iserverd ICQ server, i built a server based on v2.5.5, its works fine if registered with the script, but I got UIN 0 if registered with ICQ application (2000-2003b), — Reply to this email directly, view it on GitHub <#1 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3YJBDPVCSJBSUQ6UVCFGTZFAHMFAVCNFSM6AAAAAA7E75M46VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBRGI4TEMBSGA. You are receiving this because you authored the thread.Message ID: @.***>

coz it's normal if registering with application (kicq server), kicq also using iserverd 2.5.5

kkula9999 commented 4 months ago

btw are you all built one and working? if not i m happy to share the server out, it was running on vmware workstation, its around 300MB for server + 200MB most workable client (from 98a to 2003b)

lass222 commented 4 months ago

btw are you all built one and working? if not i m happy to share the server out, it was running on vmware workstation, its around 300MB for server + 200MB most workable client (from 98a to 2003b)

Could you share this, senior?

vjarskee commented 4 months ago

Interesting, friends, I'm literally doing the same thing right now and came across your repository. So far I've been able to build a server on old versions of Ubuntu and postgres, but I also can't connect from qip 2005 (stuck on connect). But looking at your configuration for x64, maybe we can make a docker image?

lass222 commented 4 months ago

As far as I remember, earlier vanilla iserverd compiled and ran successfully in x32 ubuntu, but under x86_64, ICQ didn't work and it seemed to have exactly these symptoms: no connection/stuck. The problem (I think) was in 64-bit, additional bytes were written somewhere in the protocol or something like that (unfortunately, I am not a programmer). I compiled with different parameters/keys/etc on a 64-bit system and nothing worked. Under x32 I still have a two-year old VM with which everything loads and works, but againg it's just vanilla.

Proof of work: https://a.uguu.se/EGGpQqRD.mp4

Ubuntu: Linux ubuntu 4.13.0-21-generic #24-Ubuntu SMP Mon Dec 18 17:29:35 UTC 2017 i686 athlon i686 GNU/Linux

Maybe that's the problem, maybe not, but just for your information :)

could you share a copy of the system from the virtual machine of the working version of the 32-bit version, sir?

vjarskee commented 4 months ago

could you share a copy of the system from the virtual machine of the working version of the 32-bit version, sir?

Let me intervene a bit, I was able to build on ubuntu 14.04.6 with build-essential and make from apt those versions (with fix in util_str.cpp file). Postgres 8.4 was built on the same system. The operability of iserverd is still questionable

0x0000beef commented 4 months ago

@lass222 This VM has some sensitive personal data (somewhere) in it, if I remember correctly, because it wasn't supposed to be shared with anyone. But I'll see what I can come up with.

kkula9999 commented 4 months ago

https://www.dropbox.com/scl/fo/5vczjq8hcokl229a3gf5i/AAL-LQHgMr7-AEJ3CzbHt5I?rlkey=yoqw1pgzgs5xraihy1gsh3arl&st=jsn9n8sf&dl=0

im trying to build on RHEL4 but still not able to compile yet

lass222 commented 4 months ago

As far as I remember, earlier vanilla iserverd compiled and ran successfully in x32 ubuntu, but under x86_64, ICQ didn't work and it seemed to have exactly these symptoms: no connection/stuck. The problem (I think) was in 64-bit, additional bytes were written somewhere in the protocol or something like that (unfortunately, I am not a programmer). I compiled with different parameters/keys/etc on a 64-bit system and nothing worked. Under x32 I still have a two-year old VM with which everything loads and works, but againg it's just vanilla.

Proof of work: https://a.uguu.se/EGGpQqRD.mp4

Ubuntu: Linux ubuntu 4.13.0-21-generic #24-Ubuntu SMP Mon Dec 18 17:29:35 UTC 2017 i686 athlon i686 GNU/Linux

Maybe that's the problem, maybe not, but just for your information :)

sir, I did not understand, does everything work on ubuntu-17.10.1 or on ubuntu 4.13.0-21?

0x0000beef commented 4 months ago

@lass222 ubuntu-17.10.1 - iso image, ubuntu 4.13.0-21 - 'uname -a' string

lass222 commented 4 months ago

@lass222 ubuntu-17.10.1 - iso image, ubuntu 4.13.0-21 - 'uname -a' string

does everything work in ubuntu-17.10.1? or is there a connection problem in this version?

0x0000beef commented 4 months ago

does everything work in ubuntu-17.10.1? or is there a connection problem in this version?

I'm not quite sure if I understand the question. What exactly do you mean? I am running iserverd in one virtual machine with a local address 192.168.1.xx and can connect to it from another virtual machine with a different local address 192.168.1.yy (Windows XP inside). I can chat with myself from different clients running in parallel with different UINs. The admin web interface also works. Haven't tried registering UIN from the client, don't know if it works or not (but since the other guys who use iserverd have registration done by a separate frontend, I guess not).

mkgrgis commented 3 months ago

According AOL OSCAR document we should check if there is correct u08, u16, u32, f32, t70 and UUID C++ implementation on amd64 in this project. After https://github.com/namikiri/iserverd/pull/3, systemd service implementation and type defining check we can use tcpdump to see what is not correct. Now Ubuntu 23.04 + PostgreSQL 17 beta works fine with iserver_db_check, but tere is a problem during client connection - look like server cannot understand input TCP data structure. Can anyone post users_info_ext sample row data from testing configuration?

SniK140 commented 1 month ago

Here is a link to the server from 2004

mkgrgis commented 1 month ago

Here is a link to the server from 2004

No source code... Let's verify u08, u16, u32, f32, t70 and UUID in structures, @SniK140 ?