mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 07:44:35 +02:00
Merge branch 'ent-5317-9399-agente-proxy-no-puede-setear-puerto-de-escucha' into 'develop'
Add proxy_address and proxy_port parameters to the agents. See merge request artica/pandorafms!3482
This commit is contained in:
commit
89a7eb65b6
@ -99,6 +99,12 @@ transfer_mode tentacle
|
|||||||
# Proxy timeout (by default 1s)
|
# Proxy timeout (by default 1s)
|
||||||
# proxy_timeout 1
|
# proxy_timeout 1
|
||||||
|
|
||||||
|
# Address the proxy will listen on.
|
||||||
|
#proxy_address 0.0.0.0
|
||||||
|
|
||||||
|
# Port the proxy will listen on.
|
||||||
|
#proxy_port 41121
|
||||||
|
|
||||||
# User the agent will run as
|
# User the agent will run as
|
||||||
#pandora_user root
|
#pandora_user root
|
||||||
|
|
||||||
|
@ -129,6 +129,12 @@ transfer_mode tentacle
|
|||||||
# Proxy timeout (by default 1s)
|
# Proxy timeout (by default 1s)
|
||||||
# proxy_timeout 1
|
# proxy_timeout 1
|
||||||
|
|
||||||
|
# Address the proxy will listen on.
|
||||||
|
#proxy_address 0.0.0.0
|
||||||
|
|
||||||
|
# Port the proxy will listen on.
|
||||||
|
#proxy_port 41121
|
||||||
|
|
||||||
# Number of threads to execute modules in parallel
|
# Number of threads to execute modules in parallel
|
||||||
#agent_threads 1
|
#agent_threads 1
|
||||||
|
|
||||||
|
@ -142,6 +142,12 @@ remote_config 0
|
|||||||
# Proxy timeout (by default 1s)
|
# Proxy timeout (by default 1s)
|
||||||
#proxy_timeout 1
|
#proxy_timeout 1
|
||||||
|
|
||||||
|
# Address the proxy will listen on.
|
||||||
|
#proxy_address 0.0.0.0
|
||||||
|
|
||||||
|
# Port the proxy will listen on.
|
||||||
|
#proxy_port 41121
|
||||||
|
|
||||||
# Number of threads to execute modules in parallel
|
# Number of threads to execute modules in parallel
|
||||||
#agent_threads 1
|
#agent_threads 1
|
||||||
|
|
||||||
|
@ -101,6 +101,12 @@ transfer_mode tentacle
|
|||||||
# Proxy timeout (by default 1s)
|
# Proxy timeout (by default 1s)
|
||||||
# proxy_timeout 1
|
# proxy_timeout 1
|
||||||
|
|
||||||
|
# Address the proxy will listen on.
|
||||||
|
#proxy_address 0.0.0.0
|
||||||
|
|
||||||
|
# Port the proxy will listen on.
|
||||||
|
#proxy_port 41121
|
||||||
|
|
||||||
# User the agent will run as
|
# User the agent will run as
|
||||||
#pandora_user root
|
#pandora_user root
|
||||||
|
|
||||||
|
@ -148,6 +148,12 @@ remote_config 0
|
|||||||
# Proxy timeout (by default 1s)
|
# Proxy timeout (by default 1s)
|
||||||
# proxy_timeout 1
|
# proxy_timeout 1
|
||||||
|
|
||||||
|
# Address the proxy will listen on.
|
||||||
|
#proxy_address 0.0.0.0
|
||||||
|
|
||||||
|
# Port the proxy will listen on.
|
||||||
|
#proxy_port 41121
|
||||||
|
|
||||||
# Number of threads to execute modules in parallel
|
# Number of threads to execute modules in parallel
|
||||||
#agent_threads 1
|
#agent_threads 1
|
||||||
|
|
||||||
|
@ -110,6 +110,12 @@ transfer_mode tentacle
|
|||||||
# Proxy timeout (by default 1s)
|
# Proxy timeout (by default 1s)
|
||||||
#proxy_timeout 1
|
#proxy_timeout 1
|
||||||
|
|
||||||
|
# Address the proxy will listen on.
|
||||||
|
#proxy_address 0.0.0.0
|
||||||
|
|
||||||
|
# Port the proxy will listen on.
|
||||||
|
#proxy_port 41121
|
||||||
|
|
||||||
# Number of threads to execute modules in parallel
|
# Number of threads to execute modules in parallel
|
||||||
#agent_threads 1
|
#agent_threads 1
|
||||||
|
|
||||||
|
@ -104,6 +104,12 @@ transfer_mode tentacle
|
|||||||
# Proxy timeout (by default 1s)
|
# Proxy timeout (by default 1s)
|
||||||
#proxy_timeout 1
|
#proxy_timeout 1
|
||||||
|
|
||||||
|
# Address the proxy will listen on.
|
||||||
|
#proxy_address 0.0.0.0
|
||||||
|
|
||||||
|
# Port the proxy will listen on.
|
||||||
|
#proxy_port 41121
|
||||||
|
|
||||||
# User the agent will run as
|
# User the agent will run as
|
||||||
#pandora_user root
|
#pandora_user root
|
||||||
|
|
||||||
|
@ -192,6 +192,8 @@ my %DefaultConf = (
|
|||||||
'udp_server_port' => 41122,
|
'udp_server_port' => 41122,
|
||||||
'udp_server_auth_address' => '0.0.0.0',
|
'udp_server_auth_address' => '0.0.0.0',
|
||||||
'udp_server' => 0,
|
'udp_server' => 0,
|
||||||
|
'proxy_address' => '0.0.0.0',
|
||||||
|
'proxy_port' => 41121,
|
||||||
'proxy_mode' => 0,
|
'proxy_mode' => 0,
|
||||||
'proxy_max_connection' => 10,
|
'proxy_max_connection' => 10,
|
||||||
'proxy_timeout' => 1,
|
'proxy_timeout' => 1,
|
||||||
@ -1383,7 +1385,7 @@ sub launch_tentacle_proxy () {
|
|||||||
if ($tentacle_pid == 0) {
|
if ($tentacle_pid == 0) {
|
||||||
|
|
||||||
#Execute tentacle server as a daemon
|
#Execute tentacle server as a daemon
|
||||||
my $new_process = "tentacle_server -b ".$Conf{'server_ip'}." -g ".$Conf{'server_port'}." -c ".$Conf{'proxy_max_connection'}." -t ".$Conf{'proxy_timeout'};
|
my $new_process = "tentacle_server -a ".$Conf{'proxy_address'}." -p ".$Conf{'proxy_port'}." -b ".$Conf{'server_ip'}." -g ".$Conf{'server_port'}." -c ".$Conf{'proxy_max_connection'}." -t ".$Conf{'proxy_timeout'};
|
||||||
|
|
||||||
$new_process .= ' -C' if ($Conf{'server_ssl'} eq '1');
|
$new_process .= ' -C' if ($Conf{'server_ssl'} eq '1');
|
||||||
|
|
||||||
|
@ -99,6 +99,12 @@ server_port 41121
|
|||||||
# Proxy timeout (by default 1s)
|
# Proxy timeout (by default 1s)
|
||||||
# proxy_timeout 1
|
# proxy_timeout 1
|
||||||
|
|
||||||
|
# Address the proxy will listen on.
|
||||||
|
#proxy_address 0.0.0.0
|
||||||
|
|
||||||
|
# Port the proxy will listen on.
|
||||||
|
#proxy_port 41121
|
||||||
|
|
||||||
# Enable or disable XML buffer.
|
# Enable or disable XML buffer.
|
||||||
xml_buffer 1
|
xml_buffer 1
|
||||||
|
|
||||||
|
@ -424,7 +424,7 @@ Pandora_Windows_Service::killTentacleProxy() {
|
|||||||
int
|
int
|
||||||
Pandora_Windows_Service::launchTentacleProxy() {
|
Pandora_Windows_Service::launchTentacleProxy() {
|
||||||
string server_ip, server_port, proxy_max_connections, proxy_timeout, server_ssl;
|
string server_ip, server_port, proxy_max_connections, proxy_timeout, server_ssl;
|
||||||
string proxy_cmd;
|
string proxy_cmd, proxy_address, proxy_port;
|
||||||
PROCESS_INFORMATION pi;
|
PROCESS_INFORMATION pi;
|
||||||
STARTUPINFO si;
|
STARTUPINFO si;
|
||||||
|
|
||||||
@ -460,7 +460,19 @@ Pandora_Windows_Service::launchTentacleProxy() {
|
|||||||
proxy_cmd = "tentacle_server.exe";
|
proxy_cmd = "tentacle_server.exe";
|
||||||
}
|
}
|
||||||
|
|
||||||
proxy_cmd += " -b " + server_ip + " -g " + server_port + " -c " + proxy_max_connections + " -t " + proxy_timeout;
|
// Proxy address.
|
||||||
|
proxy_address = conf->getValue("proxy_address");
|
||||||
|
if (proxy_address == "") {
|
||||||
|
proxy_address = "0.0.0.0";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Proxy port.
|
||||||
|
proxy_port = conf->getValue("proxy_port");
|
||||||
|
if (proxy_port == "") {
|
||||||
|
proxy_port = "41121";
|
||||||
|
}
|
||||||
|
|
||||||
|
proxy_cmd += " -b " + server_ip + " -g " + server_port + " -c " + proxy_max_connections + " -t " + proxy_timeout + " -a " + proxy_address + " -p " + proxy_port;
|
||||||
|
|
||||||
ZeroMemory (&si, sizeof (si));
|
ZeroMemory (&si, sizeof (si));
|
||||||
ZeroMemory (&pi, sizeof (pi));
|
ZeroMemory (&pi, sizeof (pi));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user