You are not logged in.

#1 2010-04-01 14:37:20

y27
Member
Registered: 2009-05-27
Posts: 147
Website

QuickShare - a simple HTTP server like quickserve with a GTK GUI

Some time ago, Xyne released his quickserve, which I liked a lot, but it was in python and so it wasn't as easy to distribute as something compiled, mainly on other platforms.

Also, I thought it wouldn't be bad to refresh my knowledge of HTTP, sockets, and such.


Anyway, QuickShare is something very similar to Xyne's quickserve, but it has a relatively nice GTK GUI, and also it works fine and easily on other platforms such as win32.

A quick description for those not knowing quickserve:
it is a primitive HTTP server which can be used for easy file sharing over your LAN / WiFi, etc., simply by running it and then accessing it by using your IP. You can also easily use it to share files with somebody on the internet if you have a public IP and you open/forward the port you chose on your router.

Screenshot:
quickshare-screenshot.png

Installation:
Install "quickshare" from AUR, or go to http://houbysoft.com/qs/ for more options, such as the git repo, or win32 binaries.


Let me know what you think.

Offline

#2 2010-04-01 16:11:14

i_love_penguins
Member
From: Germany
Registered: 2010-03-30
Posts: 46
Website

Re: QuickShare - a simple HTTP server like quickserve with a GTK GUI

Very nice work. I really appreciate that.

Useful when you don't want your files being transferred over Skype or ICQ or someone just don't have any clue how to use that or it just won't work smile
For that purposes I used "python -m SimpleHTTPServer" before but that didn't let you upload files or just change the default port.

Thanks!

Offline

#3 2010-04-02 07:50:55

sufficientsound
Member
Registered: 2010-03-21
Posts: 5

Re: QuickShare - a simple HTTP server like quickserve with a GTK GUI

How does one launch quickshare?

Offline

#4 2010-04-02 10:10:12

i_love_penguins
Member
From: Germany
Registered: 2010-03-30
Posts: 46
Website

Re: QuickShare - a simple HTTP server like quickserve with a GTK GUI

sufficientsound wrote:

How does one launch quickshare?

qs

Offline

#5 2010-04-02 11:44:45

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: QuickShare - a simple HTTP server like quickserve with a GTK GUI

I prefer quickserve by Xyne, because I'm a cli guy ;-) But I recommended quickshare to a windows user. It really works great for him, but seems like it has some problems with umlauts - e.g. äöü - in filenames. The files are being displayed correctly, but when I try do download them, the file is corrupted, e.g. a 32MB flac file was 4KB after download. Could you fix that? It's the only problem I saw so far.

And a feature request, would it be possible to add some kind of log window, so the server displays, what files are being downloaded etc?

Offline

#6 2010-04-02 16:00:45

y27
Member
Registered: 2009-05-27
Posts: 147
Website

Re: QuickShare - a simple HTTP server like quickserve with a GTK GUI

Umlauts: Hm, that's strange, I tried it and exactly the opposite occured -- the filename was garbled in the browser (Chrome), but then downloaded fine (md5s match) if I typed the exact URL. I'll look into that when I get some time.

As for the log window, I already started, in the latest git revision there now is one, displaying  the method (GET/POST) and the URL requested, I'll add some more details later.

Very nice work. I really appreciate that.

Thanks smile

edit: typo

Last edited by y27 (2010-04-02 16:01:23)

Offline

#7 2010-04-02 18:33:58

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: QuickShare - a simple HTTP server like quickserve with a GTK GUI

Ok, I'll try it with the server on my machine and maybe I'll download it from his server with another browser (also used chromium). Maybe it's important, he used a username and password, so I had to login. Maybe the behavior is a little bit different without setting username and password.

Offline

#8 2010-04-03 17:56:25

y27
Member
Registered: 2009-05-27
Posts: 147
Website

Re: QuickShare - a simple HTTP server like quickserve with a GTK GUI

That should not matter.

Anyway, I just tried it on my Windows 7 machine, and it displayed the filename correctly but I couldn't download it at all. It seems that there is some problem when trying to open such filenames with fopen(), so I replaced fopen() calls with g_fopen() and now it works fine, for me.

The change is in the latest git (http://github.com/houbysoft/quickshare), could you please try if it works for you?

Thanks

Offline

#9 2010-04-05 10:15:14

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: QuickShare - a simple HTTP server like quickserve with a GTK GUI

How am I able to test this on a windows machine? I have no idea how to compile on this OS.

Offline

#10 2010-04-05 15:29:14

y27
Member
Registered: 2009-05-27
Posts: 147
Website

Re: QuickShare - a simple HTTP server like quickserve with a GTK GUI

You can use Dev-C++ for example, create a new GTK project, and add all the files from git (yes it is annoying GUI-ness, but it's faster and easier than setting it up in commandline (so that you can use make)).

But anyway, I think that I'll just release it (hopefully today evening), and then you can directly test the new release, that will be simpler.

Offline

#11 2010-04-05 19:14:56

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: QuickShare - a simple HTTP server like quickserve with a GTK GUI

Yes this will be definitely simpler, because I don't have a windows installation here. I think I'll try it out next weekend, I'll have access to a windows machine then. Thanks for fixing it, hope it works :-)

Offline

#12 2010-04-06 00:11:21

y27
Member
Registered: 2009-05-27
Posts: 147
Website

Re: QuickShare - a simple HTTP server like quickserve with a GTK GUI

No problem.

Just updated it to 0.5 which includes the fix and the logging tab, both in the AUR and versions at http://houbysoft.com/qs/.

Tell me if it works smile

Offline

#13 2010-04-06 23:24:59

cool
Member
Registered: 2008-09-12
Posts: 111
Website

Re: QuickShare - a simple HTTP server like quickserve with a GTK GUI

Is there a PKGBUILT for aur?

Offline

#14 2010-04-07 01:00:47

y27
Member
Registered: 2009-05-27
Posts: 147
Website

Re: QuickShare - a simple HTTP server like quickserve with a GTK GUI

@cool:
Yeah, says so in the first post smile
Link is http://aur.archlinux.org/packages.php?ID=36105

@Army:
thanks for pointing out the PKGBUILD dependency error, I fixed it now.

Offline

#15 2010-04-12 14:53:49

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: QuickShare - a simple HTTP server like quickserve with a GTK GUI

Alright, we tried the current version with umlauts. It's working for files which contain umlauts in the filename. But I can't go into directories which contain an umlaut, it tells me "Error 403 - Forbidden"

edit: And I just found out, a "+" in the filename and directory name doesn't work either. Maybe there are others, e.g. "&" etc.

Last edited by Army (2010-04-12 15:12:56)

Offline

#16 2010-04-14 01:17:10

y27
Member
Registered: 2009-05-27
Posts: 147
Website

Re: QuickShare - a simple HTTP server like quickserve with a GTK GUI

That's strange, you used the windows version? I just tried on linux and it worked fine with directories also, I'll check the Windows one later.

As for the + in filenames, that's weird, the answer_to_connection() function seems to receive the filename without the pluses in it. edit: oops, url encoding

Last edited by y27 (2010-04-14 19:55:27)

Offline

#17 2010-04-14 08:20:07

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: QuickShare - a simple HTTP server like quickserve with a GTK GUI

Yes the server ran on windows and I downloaded files from it with archlinux.

Offline

#18 2010-04-14 19:57:23

y27
Member
Registered: 2009-05-27
Posts: 147
Website

Re: QuickShare - a simple HTTP server like quickserve with a GTK GUI

The author of libmicrohttpd brought to my attention that pluses should be escaped, since otherwise they are decoded as spaces by the library. I started working on it on git, for the meantime you can replace the pluses in the URL by %2B (more here).

Offline

#19 2010-04-14 20:54:50

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: QuickShare - a simple HTTP server like quickserve with a GTK GUI

I'd like to try it, but got the following error:

(1/1) checking for file conflicts                   [---------------------------------------------------------------------------------------------------------------] 100%
error: failed to prepare transaction (conflicting files)
libmicrohttpd: /usr/include/platform.h exists in filesystem

errors occurred, no packages were upgraded.
Dependencies for `quickshare' are not met, not building...

So...

toad@deskarch 1000\1 ~ > pacman -Qo /usr/include/platform.h
/usr/include/platform.h is owned by tidyhtml 1.46-1

And...

toad@deskarch 1001\2 ~ > pacman -Qi tidyhtml
Name           : tidyhtml
Version        : 1.46-1
URL            : http://tidy.sourceforge.net/
Licences       : custom 
Groups         : None
Provides       : None
Depends On     : None
Optional Deps  : None
Required By    : kdewebdev-klinkstatus  konq-plugins 
Conflicts With : None
Replaces       : None
Installed Size : 1120.00 K
Packager       : Allan McRae <allan@archlinux.org>
Architecture   : x86_64
Build Date     : Sun 21 Feb 2010 05:43:27 CET
Install Date   : Wed 24 Mar 2010 17:02:47 CET
Install Reason : Installed as a dependency for another package
Install Script : No
Description    : A tool to tidy down your HTML code to a clean style

While I am absolutely not dependent on

Description    : A tool to tidy down your HTML code to a clean style

I wondered whether this could be an unnecessary stumbling block?


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#20 2010-04-14 21:49:57

y27
Member
Registered: 2009-05-27
Posts: 147
Website

Re: QuickShare - a simple HTTP server like quickserve with a GTK GUI

I do not maintain libmicrohttpd, but someone reported this on its AUR page too, the maintainer said it's safe to overwrite.

Offline

#21 2010-04-14 22:18:08

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: QuickShare - a simple HTTP server like quickserve with a GTK GUI

Okay, works a treat, thanks smile

Feature request:

system tray integration


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#22 2010-04-16 00:49:14

y27
Member
Registered: 2009-05-27
Posts: 147
Website

Re: QuickShare - a simple HTTP server like quickserve with a GTK GUI

I'm glad you like it smile

By the way, I just fixed the issue with pluses and such in the latest git revision, they should now all be properly escaped. Tested it on linux and chrome only for now; tomorrow I'll probably do some testing on Windows, and release a new fixed version if all goes well.

As for the system tray integration, I don't use that (I have a very minimalistic dwm configuration), but it would be an interesting thing to add, I'll think about it smile

Offline

#23 2010-04-18 01:53:54

y27
Member
Registered: 2009-05-27
Posts: 147
Website

Re: QuickShare - a simple HTTP server like quickserve with a GTK GUI

It took some more time, but there we go, I released QuickShare 0.6. I tested it with all special characters allowed in a filename and it works fine. Also, I added

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

in the headers sent by QuickShare which should fix special characters appearing as white rectangles and such.

The AUR package was updated, other stuff can be downloaded as usual at http://houbysoft.com/qs/ .

Please test it and report how it works!

Offline

#24 2010-05-29 21:25:32

y27
Member
Registered: 2009-05-27
Posts: 147
Website

Re: QuickShare - a simple HTTP server like quickserve with a GTK GUI

Updated AUR package to version 0.7, in which I added proper MIME type identification (well, based on extensions), so browsing the shared folders will be nicer (ie, images will load directly, and generally the proper action for a file will be taken instead of downloading everything).

Also fixed a stupid bug with uploads enabled causing quickshare to crash.

Offline

#25 2010-06-01 16:45:00

ammon
Member
Registered: 2008-12-11
Posts: 413

Re: QuickShare - a simple HTTP server like quickserve with a GTK GUI

Can you add support to download whole directory? This way, user can only download file after file.
Browser registers directories as links, so is this problem about browser or qs?
Maybe something like automatic tar of dir? And un tar on other side?

Offline

Board footer

Powered by FluxBB