App-Charon
view release on metacpan or search on metacpan
The location of the config file is similarly dynamic. The default is just
F<.charonrc> in the current directory. The location can be overridden by
setting C<CHARON_CONFLOC>. Currently the configuration file is L<JSONY>.
So to be clear, if you wanted to set a default for C<--query-param-auth>, you
can either:
=over 3
=item 1. Set C<CHARON_QUERY_PARAM_AUTH=password=station>
=item 2. Put a line like C< query_param_auth: password=station > in F<.charonrc>
=item 3. Set C<CHARON_CONFLOC> to F<~/.charonrc> and add a line like the above to that file.
=back
=head1 COMMANDLINE OPTIONS
=head2 single positional argument
charon ~/code/DBIx-Class-Candy
The one and only positional argument to C<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.
=head2 --listen -l
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 C<--listen> is supported, but I would be glad to add support for
multiple in the future.
=head2 --autoshutdown
charon --autoshutdown 30m
charon --autoshutdown 1h3m20s
C<--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.
=head2 --query-param-auth
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 C<auth>, so links will be C<http://foo:3001/bar.tar.gz?auth=bd75z4j>. If
you want to choose the key and value pass C<$key=$value>, so if you pass
C<password=42> you could use the link C<http://foo:3001/bar.tar.gz?password=42>.
Note that while this is on by default I may decide to change that in the future.
=head2 --index --no-index
charon --no-index
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.
=head2 --help -h
charon -h
Use C<--help> to get a brief listing of the options.
=head1 AUTHOR
Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com>
=head1 COPYRIGHT AND LICENSE
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.
=cut
( run in 2.286 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )