Jump to content


flexdc


  • Please log in to reply
19 replies to this topic

#1 mappy

mappy

  • Member
  • PipPip
  • 43 posts

Posted 01 April 2011 - 05:24 AM

flexdc

Posted Image


Are you an NMDC hub owner? Give your users a flash web interface!

It's quite easy to set up; all instructions are contained in one small easy download.
Get v1.1 from here or get the latest version from my google code page.

Edited by mappy, 29 April 2011 - 04:55 AM.

My Projects: jmDC | More

#2 Mek

Mek

    Slovak Translator

  • Support
  • 531 posts

Posted 01 April 2011 - 09:40 AM

View Postmappy, on 01 April 2011 - 05:24 AM, said:

probably the only one ever done in any sort of Javascript dialect.
Not really, I made a chat-only DC client in pure HTML, JS, PHP and MySQL some years ago. However, it got some performance issues loading the userlist in larger hubs.
ApexDC++ rulez!

#3 mappy

mappy

  • Member
  • PipPip
  • 43 posts

Posted 01 April 2011 - 10:14 AM

View PostMek, on 01 April 2011 - 09:40 AM, said:

Not really, I made a chat-only DC client in pure HTML, JS, PHP and MySQL some years ago. However, it got some performance issues loading the userlist in larger hubs.

Ah, cool to hear it, i'm not too worried about that claim. Most of my hub stuff is for small-time chat with people i know in real life, so i don't have the opportunity to test it with anything much bigger than the campus hub.
For the record, though, did you have PHP or JS doing the protocol work?
My Projects: jmDC | More

#4 Mek

Mek

    Slovak Translator

  • Support
  • 531 posts

Posted 01 April 2011 - 03:23 PM

PHP was doing protocol work, JS was there to bring neccessary updates to the GUI. Ajax was used  to do that.
ApexDC++ rulez!

#5 mappy

mappy

  • Member
  • PipPip
  • 43 posts

Posted 01 April 2011 - 08:48 PM

View PostMek, on 01 April 2011 - 03:23 PM, said:

PHP was doing protocol work, JS was there to bring neccessary updates to the GUI. Ajax was used  to do that.

So, like my dcwebui, but using PHP+MySQL for the backend instead of a C++ daemon.. that's a pretty cool project. Can i ask how you managed a persistent connection to the hub, then?


This flexdc implements all the protocol work in JS, so maybe my claim holds after all Posted Image
My Projects: jmDC | More

#6 Mek

Mek

    Slovak Translator

  • Support
  • 531 posts

Posted 02 April 2011 - 09:36 AM

Persistent connection was made by using a PHP script "client.php" in an infinite loop - it communicated with the hub and replied to that communication. It inserted records into MySQL database for each needed protocol request (for example, when a chat message arrived).
The record were taken from the database by a PHP script "whatsnew.php" called using Ajax periodically.
If interested, the client named "MekDC" is available for download on my web page.
ApexDC++ rulez!

#7 FlipFlop

FlipFlop

    Newbie

  • Tester
  • 17 posts

Posted 27 April 2011 - 02:39 PM

Nice project, well chosen name too ;)

Works like a charm, even noticed a FlexHub bug: hub was sending MyINFO's instead of NickList, will fix that.
FlexHub is DC++ hubsoftware programmed completely in Lua. NMDC and ADC users in one hub!

#8 mappy

mappy

  • Member
  • PipPip
  • 43 posts

Posted 28 April 2011 - 01:02 AM

View PostFlipFlop, on 27 April 2011 - 02:39 PM, said:

Nice project, well chosen name too ;)

Works like a charm, even noticed a FlexHub bug: hub was sending MyINFO's instead of NickList, will fix that.

I'm glad you like it : ) It's still kinda primitive, though, there are a few things i'd like to add (fixed PM support, multiple hubs/tabs, fully brandable) but for now it suits my private hub well enough.

EDIT: There are $Supports flags to determine things like whether the client prefers MyINFOs instead of NickList, and things like that. It could equally be a bug at my end, this is really only tested with PtokaX, although i'm glad to hear it works with FlexHub : )
My Projects: jmDC | More

#9 FlipFlop

FlipFlop

    Newbie

  • Tester
  • 17 posts

Posted 28 April 2011 - 11:09 AM

Yep, there's no 'NoHello' in the flexdc $Supports so hub needs to send $NickList instead of MyINFO's. Is fixed now.

Noticed a flexdc bug: there's a doubling of nicks in the userlist if a nick is in both the $NickList and the $OpList
FlexHub is DC++ hubsoftware programmed completely in Lua. NMDC and ADC users in one hub!

#10 FlipFlop

FlipFlop

    Newbie

  • Tester
  • 17 posts

Posted 28 April 2011 - 05:17 PM

Another bug, when trying to login as registered user it sends an empty $MyPass to the hub, doesn't ask for pass in browser:
FlexHub is DC++ hubsoftware programmed completely in Lua. NMDC and ADC users in one hub!

#11 mappy

mappy

  • Member
  • PipPip
  • 43 posts

Posted 29 April 2011 - 04:56 AM

Thanks for the reports! I've fixed the duplicate-operators bug and added password support. I've also included all my changes since the last release, including PM support and an updated swfok daemon.
My Projects: jmDC | More

#12 FlipFlop

FlipFlop

    Newbie

  • Tester
  • 17 posts

Posted 29 April 2011 - 08:58 AM

That's quick! Works great and nice that pm's are supported now.

About the source files, I'm not familiar with Adobe Flex, can you explain how to setup the project so it can be compiled to swf?
FlexHub is DC++ hubsoftware programmed completely in Lua. NMDC and ADC users in one hub!

#13 FlipFlop

FlipFlop

    Newbie

  • Tester
  • 17 posts

Posted 29 April 2011 - 09:08 AM

There's still a bug with calculating the $Key:

[11:03:31] <FlexBot> IP: ***.***.***.*** <nick unknown> was disconnected because: Wrong key received after lock: $Key 4ÑÀ° A ѱ±ÀÀ01‘ ÑÑqÑ!‘Ñ‘ ѱ±ÀÀ01p 0
[11:03:31] <FlexBot> Lock was: EXTENDEDPROTOCOL_FLEXHUB_MULTIPROTOCOL_VQSP
[11:03:31] <FlexBot> Proper key: 4ÑÀ° A ѱ±ÀÀ01‘ ÑÑqÑ!‘Ñ‘ ѱ±ÀÀ01p 0
[11:05:22] <FlexBot> IP: ***.***.***.*** <nick unknown> was disconnected because: Wrong key received after lock: $Key ãÑÀ° A ѱ±ÀÀ01‘ ÑÑqÑ!‘Ñ‘ ѱ±ÀÀ01¶§Çç
[11:05:22] <FlexBot> Lock was: EXTENDEDPROTOCOL_FLEXHUB_MULTIPROTOCOL_4N2L
[11:05:22] <FlexBot> Proper key: ãÑÀ° A ѱ±ÀÀ01‘ ÑÑqÑ!‘Ñ‘ ѱ±ÀÀ01¶§Çç
FlexHub is DC++ hubsoftware programmed completely in Lua. NMDC and ADC users in one hub!

#14 mappy

mappy

  • Member
  • PipPip
  • 43 posts

Posted 29 April 2011 - 10:09 AM

Adobe have free and OSS versions of the Flex SDK that should be sufficient to compile the project. I was given a copy of Flash Builder 4 as part of some university promotion Adobe ran a while ago, which is a custom Eclipse setup. If you have that, you should be able to just create a new project and import the source files. With the standalone SDK, it should be easily possible although i'm not sure of the exact way of configuring it.

I just tried FlexDC 1.1 against FlexHub 1055, and it seemed to unlock fine first try (image). Can you reproduce that every time? You can right-click in the top toolbar in FlexDC to enable debug mode.
My Projects: jmDC | More

#15 FlipFlop

FlipFlop

    Newbie

  • Tester
  • 17 posts

Posted 29 April 2011 - 10:35 AM

<edited - $Key is always checked, locally as well, unless !set check_key false  is used>

After some tests it seems to provide a wrong key only occasionally.

Thanks for the info, will have a look at Flash Builder 4
FlexHub is DC++ hubsoftware programmed completely in Lua. NMDC and ADC users in one hub!

#16 FlipFlop

FlipFlop

    Newbie

  • Tester
  • 17 posts

Posted 29 April 2011 - 10:59 AM

The wrong $Keys as posted above were sent from a russian browser, so it's probably a charset conversion bug that sends the wrong key
FlexHub is DC++ hubsoftware programmed completely in Lua. NMDC and ADC users in one hub!

#17 mappy

mappy

  • Member
  • PipPip
  • 43 posts

Posted 29 April 2011 - 12:25 PM

Yeah, it assumes Windows-1252 (Latin-1) when decoding the key, at least. I think i use system locale everywhere else.


I'll look into it some more (and work in some more character encoding options for the next version).
My Projects: jmDC | More

#18 FlipFlop

FlipFlop

    Newbie

  • Tester
  • 17 posts

Posted 30 April 2011 - 12:58 PM

New FlexHub release, svn 1065, now works well together with flexdc.
FlexHub is DC++ hubsoftware programmed completely in Lua. NMDC and ADC users in one hub!

#19 Neolo

Neolo

    Ukrainian Translator

  • Translator
  • 18 posts

Posted 21 November 2011 - 01:53 PM

Hi! How to run it on Linux server?

UPDATE #1:

[HOW TO] Flash policy on Linux server.

Finally I figured out how to allow FlexDC to run on Linux server.

1) Warning! You need python to be v. 2.6+ (for CentOS use epel repository because regular yum install python gives 2.4 only).
2) Download attached archive, upload files from it to any folder on a destination server where dc hub is running.
3) Istall it using # bash ./install.sh
4) Start service # service flashpolicyd start (it should be already configured to start on system boot).
5) You are done! Try to connect with hub using FlexDC.

P.S: You can edit flashpolicy.xml before installing according to your requirements.

UPDATE #2:

[HOW TO] Import source files in Flash Builder v.4.5.

I was almost broke my head when tried to add the source of FlexDC into Flash Builder. Author, it would be very cool of providing as addition entire flash builder project, cuz so much problems path structures.
Anyway, step-by-step doing next:

1) Get Flash Builder 4.5. Install it and guess you need an activation.
2) Create new project in File->New->Flex Project and call it flexdc. Leave all options by default.
3) Mark all files and res folder from flex-src and grab them by mouse in "src" in expanded tree in flash builder. You will get 2 errors about wrong structures.
4) Double click on NMDCEvent.as end in the top of code make it looks like this: package  {
5) Same with NMDCHub.as
6) Press Save and Refresh. You are just got another error.
7) Go into flexdc.mxml on line 18, find end edit itemrenderer to this: itemRenderer="flexUser"
8) Press Save and Refresh. It's done, now you can do next whatever you need with this project.

Also i provided exported FlexDC's project if you are don't want to do all that. Look in attachments.

You'r welcome! :)

Attached Files


Edited by Neolo, 23 November 2011 - 03:31 PM.

Translation provided by NLight DC++ Ukrainian Network

#20 Neolo

Neolo

    Ukrainian Translator

  • Translator
  • 18 posts

Posted 22 November 2011 - 09:59 PM

Here is another question. My hub (NMDC) uses windows-1251 only. How to set FlexDC in this encoding?

UPDATE #1:
Go into project editing. In file NMDChub.as line 35 change windows-1252 to windows-1251 or another one you use on your hub.

Thx for help =).
Translation provided by NLight DC++ Ukrainian Network


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users