- COMMANDLINE OPTIONS
- COPYRIGHT AND LICENSE
charon - Share files over HTTP easily and conveniently
$ charon serving /home/frew on 0.0.0.0:3000 with a query param auth of ?auth=br5Y2jX55
Now you can navigate to
http://127.0.0.1:3000/?auth=br5Y2jX55 and download files under
Here's an example of using it with all the switches:
charon ~ --listen *:8080 --autoshutdown 1h --query-param-auth '' --no-index
Charon is the ferryman of Hades who carries souls of the newly deceased across the rivers Styx and Acheron that divided the world of the living from the world of the dead
charon is a tool for easily sharing files. I have found that at work I often have trouble ensuring all the various permissions are correct and all the various machines have the right tools and whatnot to serve files from one machine to another.
charon helps with this by making some of what used to be Plack oneliners into a much more robust and convenient tool.
charon uses a configuration system I developed that allows the user to use either a file, or environment variables, or both. Currently all the configuration allows you to do is set defaults for the commandline options. Basically it works like this:
CHARON_$FOOis set, use that to set
$fooexists in the config file, use that to set
The location of the config file is similarly dynamic. The default is just .charonrc in the current directory. The location can be overridden by setting
CHARON_CONFLOC. Currently the configuration file is JSONY.
So to be clear, if you wanted to set a default for
--query-param-auth, you can either:
- 1. Set
- 2. Put a line like
query_param_auth: password=stationin .charonrc
- 3. Set
CHARON_CONFLOCto ~/.charonrc and add a line like the above to that file.
The one and only positional argument to
charon is the directory or file to serve. The default is the current directory, but you can pass another directory or even file if you want to serve something else.
charon --listen *:5000 charon -l 10.6.1.6:9090
If you want to choose the port and IP to listen on use this option. Currently only one
--listen is supported, but I would be glad to add support for multiple in the future.
charon --autoshutdown 30m charon --autoshutdown 1h3m20s
--autoshutdown requires a single argument that expresses a duration. The point is so that you can timebox your file sharing and then after the duration it will just go away, instead of you forgetting to shut it down and leaving it running forever.
charon --query-param-auth 'password=station' charon --query-param-auth ''
Query param auth is just a handy way to be able to send moderately authenticated links to your friends. This is on by default and generates a password with the key of
auth, so links will be
http://foo:3001/bar.tar.gz?auth=bd75z4j. If you want to choose the key and value pass
$key=$value, so if you pass
password=42 you could use the link
Note that while this is on by default I may decide to change that in the future.
This option is on by default, and allows the client to get an html based directory listing. You might turn this off if you want to have a bit more security-through-obscurity to allow only sharing files you give people links to.
--help to get a brief listing of the options.
Arthur Axel "fREW" Schmidt <email@example.com>
This software is copyright (c) 2015 by Arthur Axel "fREW" Schmidt.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.