2020-01-21 19:48:05 +08:00
|
|
|
#include "help.h"
|
2019-02-07 17:26:48 +08:00
|
|
|
|
|
|
|
char help_information(void)
|
|
|
|
{
|
2020-01-21 19:48:05 +08:00
|
|
|
static const char name[] = "CProxy";
|
2019-02-07 17:26:48 +08:00
|
|
|
static const char subject[] = "proxy server";
|
|
|
|
static const struct {
|
2020-01-21 19:48:05 +08:00
|
|
|
const char *email;
|
2019-02-07 17:26:48 +08:00
|
|
|
} author = {
|
2020-01-21 19:48:05 +08:00
|
|
|
"aixiao@aixiao.me",
|
2019-12-16 19:27:36 +08:00
|
|
|
};
|
2019-02-07 17:26:48 +08:00
|
|
|
|
2020-01-21 19:48:05 +08:00
|
|
|
static const char usage[] = "Usage: [-?hpt] [-s signal] [-c filename]";
|
2019-02-07 17:26:48 +08:00
|
|
|
static const char *s_help[] = {
|
2019-05-09 18:25:42 +08:00
|
|
|
"",
|
|
|
|
"Options:",
|
2020-07-30 18:10:31 +08:00
|
|
|
" -p --process : process number",
|
|
|
|
" -t --timeout : timeout minute",
|
|
|
|
" -e --coding : ssl coding, [0-128]",
|
2020-03-24 11:46:32 +08:00
|
|
|
" -s --signal : send signal to a master process: stop, quit, restart, reload, status",
|
2020-03-24 14:15:15 +08:00
|
|
|
" -c --config : set configuration file, default: CProxy.conf",
|
2020-03-24 11:46:32 +08:00
|
|
|
" -? -h --? --help : help information",
|
2019-02-07 17:26:48 +08:00
|
|
|
"",
|
|
|
|
0
|
|
|
|
};
|
|
|
|
|
|
|
|
fprintf(stderr, "%s %s\n", name, subject);
|
2020-01-21 19:48:05 +08:00
|
|
|
fprintf(stderr, "Author: %s\n", author.email);
|
2019-05-09 18:25:42 +08:00
|
|
|
fprintf(stderr, "%s\n", usage);
|
2019-02-07 17:26:48 +08:00
|
|
|
|
|
|
|
int l;
|
|
|
|
for (l = 0; s_help[l]; l++) {
|
|
|
|
fprintf(stderr, "%s\n", s_help[l]);
|
|
|
|
}
|
|
|
|
|
|
|
|
BUILD("Compile、link.\n");
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|