mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-24 22:00:18 +00:00
Add tcp.islocal to rtr (#9508)
1. Currently, tcp server binds any interface. The option allows to restrict the binding to loopback interface only. e tcp.islocal=true.
This commit is contained in:
parent
c12418f05f
commit
a792aaafbe
@ -2711,6 +2711,9 @@ R_API int r_core_config_init(RCore *core) {
|
||||
free (tmpdir);
|
||||
r_config_desc (cfg, "http.uproot", "Path where files are uploaded");
|
||||
|
||||
/* tcp */
|
||||
SETPREF ("tcp.islocal", "false", "Bind a loopback for tcp command server");
|
||||
|
||||
/* graph */
|
||||
SETPREF ("graph.comments", "true", "Show disasm comments in graph");
|
||||
SETPREF ("graph.cmtright", "false", "Show comments at right");
|
||||
|
@ -1847,6 +1847,8 @@ R_API int r_core_rtr_cmds (RCore *core, const char *port) {
|
||||
}
|
||||
|
||||
s = r_socket_new (0);
|
||||
s->local = r_config_get_i(core->config, "tcp.islocal");
|
||||
|
||||
if (!r_socket_listen (s, port, NULL)) {
|
||||
eprintf ("Error listening on port %s\n", port);
|
||||
r_socket_free (s);
|
||||
|
Loading…
Reference in New Issue
Block a user