You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+1
Original file line number
Diff line number
Diff line change
@@ -76,6 +76,7 @@ OPTIONS:
76
76
-g, --gid Group id to run with
77
77
-s, --signal Signal to send to the command when exit it (default: 1, SIGHUP)
78
78
-a, --url-arg Allow client to send command line arguments in URL (eg: http://localhost:7681?arg=foo&arg=bar)
79
+
-f, --arg-file File prefix fora unique generated temp file that URL arguments are written to (ex. /tmp/prefix); the generated file's full path is then passedin as a command line argument (ex. /tmp/prefix{unique string})
79
80
-R, --readonly Do not allow clients to write to the TTY
80
81
-t, --client-option Send option to client (format: key=value), repeat to add more options
81
82
-T, --terminal-type Terminal type to report, default: xterm-256color
Allow client to send command line arguments in URL (eg:
64
64
\[la]http://localhost:7681?arg=foo&arg=bar\[ra])
65
65
66
+
.PP
67
+
\-f, \-\-arg\-file
68
+
File prefix for a unique generated temp file that URL arguments are written to (ex. /tmp/prefix); the generated file's full path is then passed in as a command line argument (ex. /tmp/prefix{unique string})
Allow client to send command line arguments in URL (eg: http://localhost:7681?arg=foo&arg=bar)
42
42
43
+
-f, --arg-file
44
+
File prefix for a unique generated temp file that URL arguments are written to (ex. /tmp/prefix); the generated file's full path is then passed in as a command line argument (ex. /tmp/prefix{unique string})
" -s, --signal Signal to send to the command when exit it (default: 1, SIGHUP)\n"
104
105
" -a, --url-arg Allow client to send command line arguments in URL (eg: http://localhost:7681?arg=foo&arg=bar)\n"
106
+
" -f, --arg-file File prefix for a unique generated temp file that URL arguments are written to (ex. /tmp/prefix); the generated file's full path is then passed in as a command line argument (ex. /tmp/prefix{unique string})\n"
105
107
" -R, --readonly Do not allow clients to write to the TTY\n"
106
108
" -t, --client-option Send option to client (format: key=value), repeat to add more options\n"
107
109
" -T, --terminal-type Terminal type to report, default: xterm-256color\n"
@@ -177,6 +179,7 @@ static struct server *server_new(int argc, char **argv, int start) {
177
179
178
180
staticvoidserver_free(structserver*ts) {
179
181
if (ts==NULL) return;
182
+
if (ts->arg_file!=NULL) free(ts->arg_file);
180
183
if (ts->credential!=NULL) free(ts->credential);
181
184
if (ts->index!=NULL) free(ts->index);
182
185
free(ts->command);
@@ -326,6 +329,11 @@ int main(int argc, char **argv) {
326
329
break;
327
330
case'a':
328
331
server->url_arg= true;
332
+
server->arg_file=NULL;
333
+
break;
334
+
case'f':
335
+
server->arg_file=strdup(optarg);
336
+
server->url_arg= false;
329
337
break;
330
338
case'R':
331
339
server->readonly= true;
@@ -527,7 +535,8 @@ int main(int argc, char **argv) {
527
535
lwsl_notice(" websocket: %s\n", endpoints.ws);
528
536
}
529
537
if (server->check_origin) lwsl_notice(" check origin: true\n");
530
-
if (server->url_arg) lwsl_notice(" allow url arg: true\n");
538
+
if (server->url_arg) lwsl_notice(" allow url arg to cli arg: true\n");
539
+
if (server->arg_file!=NULL) lwsl_notice(" temp file name prefix: %s\n", server->arg_file);
531
540
if (server->readonly) lwsl_notice(" readonly: true\n");
532
541
if (server->max_clients>0) lwsl_notice(" max clients: %d\n", server->max_clients);
0 commit comments