Skip to content

Commit

Permalink
Implement proxy support for Union Station.
Browse files Browse the repository at this point in the history
  • Loading branch information
FooBarWidget committed Aug 8, 2011
1 parent 1b7d81b commit 2c09250
Show file tree
Hide file tree
Showing 12 changed files with 123 additions and 10 deletions.
12 changes: 12 additions & 0 deletions ext/apache2/Configuration.cpp
Expand Up @@ -282,6 +282,8 @@ DEFINE_SERVER_STR_CONFIG_SETTER(cmd_passenger_temp_dir, tempDir)
DEFINE_SERVER_STR_CONFIG_SETTER(cmd_union_station_gateway_address, unionStationGatewayAddress) DEFINE_SERVER_STR_CONFIG_SETTER(cmd_union_station_gateway_address, unionStationGatewayAddress)
DEFINE_SERVER_INT_CONFIG_SETTER(cmd_union_station_gateway_port, unionStationGatewayPort, int, 1) DEFINE_SERVER_INT_CONFIG_SETTER(cmd_union_station_gateway_port, unionStationGatewayPort, int, 1)
DEFINE_SERVER_STR_CONFIG_SETTER(cmd_union_station_gateway_cert, unionStationGatewayCert) DEFINE_SERVER_STR_CONFIG_SETTER(cmd_union_station_gateway_cert, unionStationGatewayCert)
DEFINE_SERVER_STR_CONFIG_SETTER(cmd_union_station_proxy_address, unionStationProxyAddress)
DEFINE_SERVER_STR_CONFIG_SETTER(cmd_union_station_proxy_type, unionStationProxyType)
DEFINE_SERVER_STR_CONFIG_SETTER(cmd_passenger_analytics_log_dir, analyticsLogDir) DEFINE_SERVER_STR_CONFIG_SETTER(cmd_passenger_analytics_log_dir, analyticsLogDir)
DEFINE_SERVER_STR_CONFIG_SETTER(cmd_passenger_analytics_log_user, analyticsLogUser) DEFINE_SERVER_STR_CONFIG_SETTER(cmd_passenger_analytics_log_user, analyticsLogUser)
DEFINE_SERVER_STR_CONFIG_SETTER(cmd_passenger_analytics_log_group, analyticsLogGroup) DEFINE_SERVER_STR_CONFIG_SETTER(cmd_passenger_analytics_log_group, analyticsLogGroup)
Expand Down Expand Up @@ -619,6 +621,16 @@ const command_rec passenger_commands[] = {
NULL, NULL,
RSRC_CONF, RSRC_CONF,
"The Union Station Gateway certificate."), "The Union Station Gateway certificate."),
AP_INIT_TAKE1("UnionStationProxyAddress",
(Take1Func) cmd_union_station_proxy_address,
NULL,
RSRC_CONF,
"The address of the proxy that should be used for sending data to Union Station."),
AP_INIT_TAKE1("UnionStationProxyType",
(Take1Func) cmd_union_station_proxy_type,
NULL,
RSRC_CONF,
"The type of the proxy that should be used for sending data to Union Station."),
AP_INIT_TAKE1("PassengerAnalyticsLogDir", AP_INIT_TAKE1("PassengerAnalyticsLogDir",
(Take1Func) cmd_passenger_analytics_log_dir, (Take1Func) cmd_passenger_analytics_log_dir,
NULL, NULL,
Expand Down
13 changes: 12 additions & 1 deletion ext/apache2/Configuration.hpp
Expand Up @@ -399,6 +399,8 @@ struct ServerConfig {
string unionStationGatewayAddress; string unionStationGatewayAddress;
int unionStationGatewayPort; int unionStationGatewayPort;
string unionStationGatewayCert; string unionStationGatewayCert;
string unionStationProxyAddress;
string unionStationProxyType;


/** Directory in which analytics logs should be saved. */ /** Directory in which analytics logs should be saved. */
string analyticsLogDir; string analyticsLogDir;
Expand All @@ -421,7 +423,9 @@ struct ServerConfig {
tempDir = getSystemTempDir(); tempDir = getSystemTempDir();
unionStationGatewayAddress = DEFAULT_UNION_STATION_GATEWAY_ADDRESS; unionStationGatewayAddress = DEFAULT_UNION_STATION_GATEWAY_ADDRESS;
unionStationGatewayPort = DEFAULT_UNION_STATION_GATEWAY_PORT; unionStationGatewayPort = DEFAULT_UNION_STATION_GATEWAY_PORT;
unionStationGatewayCert = ""; unionStationGatewayCert = string();
unionStationProxyAddress = string();
unionStationProxyType = string();
analyticsLogUser = DEFAULT_ANALYTICS_LOG_USER; analyticsLogUser = DEFAULT_ANALYTICS_LOG_USER;
analyticsLogGroup = DEFAULT_ANALYTICS_LOG_GROUP; analyticsLogGroup = DEFAULT_ANALYTICS_LOG_GROUP;
analyticsLogPermissions = DEFAULT_ANALYTICS_LOG_PERMISSIONS; analyticsLogPermissions = DEFAULT_ANALYTICS_LOG_PERMISSIONS;
Expand Down Expand Up @@ -466,6 +470,13 @@ struct ServerConfig {
"/passenger-analytics-logs." + "/passenger-analytics-logs." +
username; username;
} }

if (unionStationProxyType != ""
&& unionStationProxyType != "http"
&& unionStationProxyType != "socks5") {
throw ConfigurationException(string("The option 'UnionStationProxyType' ") +
"may only be set to 'http' or 'socks5'.");
}
} }
}; };


Expand Down
2 changes: 2 additions & 0 deletions ext/apache2/Hooks.cpp
Expand Up @@ -1404,6 +1404,8 @@ class Hooks {
serverConfig.unionStationGatewayAddress, serverConfig.unionStationGatewayAddress,
serverConfig.unionStationGatewayPort, serverConfig.unionStationGatewayPort,
serverConfig.unionStationGatewayCert, serverConfig.unionStationGatewayCert,
serverConfig.unionStationProxyAddress,
serverConfig.unionStationProxyType,
serverConfig.prestartURLs); serverConfig.prestartURLs);


analyticsLogger = ptr(new AnalyticsLogger(agentsStarter.getLoggingSocketAddress(), analyticsLogger = ptr(new AnalyticsLogger(agentsStarter.getLoggingSocketAddress(),
Expand Down
4 changes: 4 additions & 0 deletions ext/common/AgentsStarter.cpp
Expand Up @@ -61,6 +61,8 @@ agents_starter_start(AgentsStarter *as,
const char *unionStationGatewayAddress, const char *unionStationGatewayAddress,
unsigned short unionStationGatewayPort, unsigned short unionStationGatewayPort,
const char *unionStationGatewayCert, const char *unionStationGatewayCert,
const char *unionStationProxyAddress,
const char *unionStationProxyType,
const char **prestartURLs, unsigned int prestartURLsCount, const char **prestartURLs, unsigned int prestartURLsCount,
const AfterForkCallback afterFork, const AfterForkCallback afterFork,
void *callbackArgument, void *callbackArgument,
Expand Down Expand Up @@ -91,6 +93,8 @@ agents_starter_start(AgentsStarter *as,
unionStationGatewayAddress, unionStationGatewayAddress,
unionStationGatewayPort, unionStationGatewayPort,
unionStationGatewayCert, unionStationGatewayCert,
unionStationProxyAddress,
unionStationProxyType,
setOfprestartURLs, setOfprestartURLs,
afterForkFunctionObject); afterForkFunctionObject);
return 1; return 1;
Expand Down
2 changes: 2 additions & 0 deletions ext/common/AgentsStarter.h
Expand Up @@ -61,6 +61,8 @@ int agents_starter_start(AgentsStarter *as,
const char *unionStationGatewayAddress, const char *unionStationGatewayAddress,
unsigned short unionStationGatewayPort, unsigned short unionStationGatewayPort,
const char *unionStationGatewayCert, const char *unionStationGatewayCert,
const char *unionStationProxyAddress,
const char *unionStationProxyType,
const char **prestartURLs, unsigned int prestartURLsCount, const char **prestartURLs, unsigned int prestartURLsCount,
const AfterForkCallback afterFork, const AfterForkCallback afterFork,
void *callbackArgument, void *callbackArgument,
Expand Down
4 changes: 4 additions & 0 deletions ext/common/AgentsStarter.hpp
Expand Up @@ -384,6 +384,8 @@ class AgentsStarter {
const string &unionStationGatewayAddress, const string &unionStationGatewayAddress,
unsigned short unionStationGatewayPort, unsigned short unionStationGatewayPort,
const string &unionStationGatewayCert, const string &unionStationGatewayCert,
const string &unionStationProxyAddress,
const string &unionStationProxyType,
const set<string> &prestartURLs, const set<string> &prestartURLs,
const function<void ()> &afterFork = function<void ()>()) const function<void ()> &afterFork = function<void ()>())
{ {
Expand Down Expand Up @@ -425,6 +427,8 @@ class AgentsStarter {
.set ("union_station_gateway_address", unionStationGatewayAddress) .set ("union_station_gateway_address", unionStationGatewayAddress)
.setInt ("union_station_gateway_port", unionStationGatewayPort) .setInt ("union_station_gateway_port", unionStationGatewayPort)
.set ("union_station_gateway_cert", realUnionStationGatewayCert) .set ("union_station_gateway_cert", realUnionStationGatewayCert)
.set ("union_station_proxy_address", unionStationProxyAddress)
.set ("union_station_proxy_type", unionStationProxyType)
.set ("prestart_urls", serializePrestartURLs(prestartURLs)); .set ("prestart_urls", serializePrestartURLs(prestartURLs));


SocketPair fds; SocketPair fds;
Expand Down
14 changes: 10 additions & 4 deletions ext/common/LoggingAgent/LoggingServer.h
Expand Up @@ -185,7 +185,8 @@ class LoggingServer: public EventedMessageServer {
virtual void dump(ostream &stream) const { virtual void dump(ostream &stream) const {
stream << " Log file: file=" << filename << ", " stream << " Log file: file=" << filename << ", "
"opened=" << opened << ", " "opened=" << opened << ", "
"age=" << long(ev_now(server->getLoop()) - lastUsed) << "\n"; "lastUsed=" << long(ev_now(server->getLoop()) - lastUsed) << "s ago, "
"lastFlushed=" << long(ev_now(server->getLoop()) - lastFlushed) << "s ago\n";
} }
}; };


Expand Down Expand Up @@ -268,7 +269,8 @@ class LoggingServer: public EventedMessageServer {
"node=" << nodeName << ", " "node=" << nodeName << ", "
"category=" << category << ", " "category=" << category << ", "
"opened=" << opened << ", " "opened=" << opened << ", "
"age=" << long(ev_now(server->getLoop()) - lastUsed) << ", " "lastUsed=" << long(ev_now(server->getLoop()) - lastUsed) << "s ago, "
"lastFlushed=" << long(ev_now(server->getLoop()) - lastFlushed) << "s ago, "
"bufferSize=" << bufferSize << "bufferSize=" << bufferSize <<
"\n"; "\n";
} }
Expand Down Expand Up @@ -1206,11 +1208,15 @@ class LoggingServer: public EventedMessageServer {
gid_t gid = GROUP_NOT_GIVEN, gid_t gid = GROUP_NOT_GIVEN,
const string &unionStationGatewayAddress = DEFAULT_UNION_STATION_GATEWAY_ADDRESS, const string &unionStationGatewayAddress = DEFAULT_UNION_STATION_GATEWAY_ADDRESS,
unsigned short unionStationGatewayPort = DEFAULT_UNION_STATION_GATEWAY_PORT, unsigned short unionStationGatewayPort = DEFAULT_UNION_STATION_GATEWAY_PORT,
const string &unionStationGatewayCert = "") const string &unionStationGatewayCert = "",
const string &unionStationProxyAddress = "",
const string &unionStationProxyPort = "")
: EventedMessageServer(loop, fd, accountsDatabase), : EventedMessageServer(loop, fd, accountsDatabase),
remoteSender(unionStationGatewayAddress, remoteSender(unionStationGatewayAddress,
unionStationGatewayPort, unionStationGatewayPort,
unionStationGatewayCert), unionStationGatewayCert,
unionStationProxyAddress,
unionStationProxyPort),
garbageCollectionTimer(loop), garbageCollectionTimer(loop),
sinkFlushingTimer(loop), sinkFlushingTimer(loop),
exitTimer(loop) exitTimer(loop)
Expand Down
9 changes: 7 additions & 2 deletions ext/common/LoggingAgent/Main.cpp
Expand Up @@ -162,7 +162,9 @@ main(int argc, char *argv[]) {
false, DEFAULT_UNION_STATION_GATEWAY_ADDRESS); false, DEFAULT_UNION_STATION_GATEWAY_ADDRESS);
int unionStationGatewayPort = options.getInt("union_station_gateway_port", int unionStationGatewayPort = options.getInt("union_station_gateway_port",
false, DEFAULT_UNION_STATION_GATEWAY_PORT); false, DEFAULT_UNION_STATION_GATEWAY_PORT);
string unionStationGatewayCert = options.get("union_station_gateway_cert", false); string unionStationGatewayCert = options.get("union_station_gateway_cert", false);
string unionStationProxyAddress = options.get("union_station_proxy_address", false);
string unionStationProxyType = options.get("union_station_proxy_type", false);


curl_global_init(CURL_GLOBAL_ALL); curl_global_init(CURL_GLOBAL_ALL);


Expand Down Expand Up @@ -251,7 +253,9 @@ main(int argc, char *argv[]) {
"u=rwx,g=rx,o=rx", GROUP_NOT_GIVEN, "u=rwx,g=rx,o=rx", GROUP_NOT_GIVEN,
unionStationGatewayAddress, unionStationGatewayAddress,
unionStationGatewayPort, unionStationGatewayPort,
unionStationGatewayCert); unionStationGatewayCert,
unionStationProxyAddress,
unionStationProxyType);
loggingServer = &server; loggingServer = &server;




Expand All @@ -276,6 +280,7 @@ main(int argc, char *argv[]) {


/********** Initialized! Enter main loop... **********/ /********** Initialized! Enter main loop... **********/


P_DEBUG("Logging agent online, listening at " << socketAddress);
ev_loop(eventLoop, 0); ev_loop(eventLoop, 0);
return exitCode; return exitCode;
} catch (const tracable_exception &e) { } catch (const tracable_exception &e) {
Expand Down
28 changes: 25 additions & 3 deletions ext/common/LoggingAgent/RemoteSender.h
Expand Up @@ -72,6 +72,8 @@ class RemoteSender {
string ip; string ip;
unsigned short port; unsigned short port;
string certificate; string certificate;
string proxyAddress;
string proxyType;


CURL *curl; CURL *curl;
struct curl_slist *headers; struct curl_slist *headers;
Expand Down Expand Up @@ -103,6 +105,16 @@ class RemoteSender {
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curlDataReceived); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curlDataReceived);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, this); curl_easy_setopt(curl, CURLOPT_WRITEDATA, this);
if (!proxyAddress.empty()) {
curl_easy_setopt(curl, CURLOPT_PROXY, proxyAddress.c_str());
if (proxyType.empty() || proxyType == "http") {
curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
} else if (proxyType == "socks5") {
curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
} else {
throw RuntimeException("Only 'http' and 'socks5' proxies are supported.");
}
}
if (certificate.empty()) { if (certificate.empty()) {
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
} else { } else {
Expand All @@ -129,10 +141,14 @@ class RemoteSender {
} }


public: public:
Server(const string &ip, const string &hostName, unsigned short port, const string &cert) { Server(const string &ip, const string &hostName, unsigned short port, const string &cert,
const string &proxyAddress, const string &proxyType)
{
this->ip = ip; this->ip = ip;
this->port = port; this->port = port;
certificate = cert; certificate = cert;
this->proxyAddress = proxyAddress;
this->proxyType = proxyType;


hostHeader = "Host: " + hostName; hostHeader = "Host: " + hostName;
headers = NULL; headers = NULL;
Expand Down Expand Up @@ -245,6 +261,8 @@ class RemoteSender {
string gatewayAddress; string gatewayAddress;
unsigned short gatewayPort; unsigned short gatewayPort;
string certificate; string certificate;
string proxyAddress;
string proxyType;
BlockingQueue<Item> queue; BlockingQueue<Item> queue;
oxt::thread *thr; oxt::thread *thr;


Expand Down Expand Up @@ -298,7 +316,8 @@ class RemoteSender {


servers.clear(); servers.clear();
for (it = ips.begin(); it != ips.end(); it++) { for (it = ips.begin(); it != ips.end(); it++) {
ServerPtr server(new Server(*it, gatewayAddress, gatewayPort, certificate)); ServerPtr server = make_shared<Server>(*it, gatewayAddress, gatewayPort,
certificate, proxyAddress, proxyType);
if (server->ping()) { if (server->ping()) {
servers.push_back(server); servers.push_back(server);
} else { } else {
Expand Down Expand Up @@ -418,12 +437,15 @@ class RemoteSender {
} }


public: public:
RemoteSender(const string &gatewayAddress, unsigned short gatewayPort, const string &certificate) RemoteSender(const string &gatewayAddress, unsigned short gatewayPort, const string &certificate,
const string &proxyAddress, const string &proxyType)
: queue(1024) : queue(1024)
{ {
this->gatewayAddress = gatewayAddress; this->gatewayAddress = gatewayAddress;
this->gatewayPort = gatewayPort; this->gatewayPort = gatewayPort;
this->certificate = certificate; this->certificate = certificate;
this->proxyAddress = proxyAddress;
this->proxyType = proxyType;
thr = new oxt::thread( thr = new oxt::thread(
boost::bind(&RemoteSender::threadMain, this), boost::bind(&RemoteSender::threadMain, this),
"RemoteSender thread", "RemoteSender thread",
Expand Down
35 changes: 35 additions & 0 deletions ext/nginx/Configuration.c
Expand Up @@ -57,6 +57,11 @@ static ngx_path_init_t ngx_http_proxy_temp_path = {
}; };




static int
ngx_str_equals(ngx_str_t *str, const char *value) {
return ngx_memn2cmp(str->data, (u_char *) value, str->len, strlen(value)) == 0;
}

void * void *
passenger_create_main_conf(ngx_conf_t *cf) passenger_create_main_conf(ngx_conf_t *cf)
{ {
Expand Down Expand Up @@ -92,6 +97,10 @@ passenger_create_main_conf(ngx_conf_t *cf)
conf->union_station_gateway_port = (ngx_uint_t) NGX_CONF_UNSET; conf->union_station_gateway_port = (ngx_uint_t) NGX_CONF_UNSET;
conf->union_station_gateway_cert.data = NULL; conf->union_station_gateway_cert.data = NULL;
conf->union_station_gateway_cert.len = 0; conf->union_station_gateway_cert.len = 0;
conf->union_station_proxy_address.data = NULL;
conf->union_station_proxy_address.len = 0;
conf->union_station_proxy_type.data = NULL;
conf->union_station_proxy_type.len = 0;


conf->prestart_uris = ngx_array_create(cf->pool, 1, sizeof(ngx_str_t)); conf->prestart_uris = ngx_array_create(cf->pool, 1, sizeof(ngx_str_t));
if (conf->prestart_uris == NULL) { if (conf->prestart_uris == NULL) {
Expand Down Expand Up @@ -234,6 +243,18 @@ passenger_init_main_conf(ngx_conf_t *cf, void *conf_pointer)
conf->union_station_gateway_cert.data = (u_char *) ""; conf->union_station_gateway_cert.data = (u_char *) "";
} }


if (conf->union_station_proxy_address.len == 0) {
conf->union_station_proxy_address.data = (u_char *) "";
}

if (conf->union_station_proxy_type.len == 0) {
conf->union_station_proxy_type.data = (u_char *) "";

} else if (!ngx_str_equals(&conf->union_station_proxy_type, "http")
&& !ngx_str_equals(&conf->union_station_proxy_type, "socks5")) {
return "union_station_proxy_type may only be 'http' or 'socks5'.";
}

return NGX_CONF_OK; return NGX_CONF_OK;
} }


Expand Down Expand Up @@ -1145,6 +1166,20 @@ const ngx_command_t passenger_commands[] = {
offsetof(passenger_main_conf_t, union_station_gateway_cert), offsetof(passenger_main_conf_t, union_station_gateway_cert),
NULL }, NULL },


{ ngx_string("union_station_proxy_address"),
NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1,
ngx_conf_set_str_slot,
NGX_HTTP_MAIN_CONF_OFFSET,
offsetof(passenger_main_conf_t, union_station_proxy_address),
NULL },

{ ngx_string("union_station_proxy_type"),
NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1,
ngx_conf_set_str_slot,
NGX_HTTP_MAIN_CONF_OFFSET,
offsetof(passenger_main_conf_t, union_station_proxy_type),
NULL },

{ ngx_string("union_station_filter"), { ngx_string("union_station_filter"),
NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1,
union_station_filter, union_station_filter,
Expand Down
2 changes: 2 additions & 0 deletions ext/nginx/Configuration.h
Expand Up @@ -80,6 +80,8 @@ typedef struct {
ngx_str_t union_station_gateway_address; ngx_str_t union_station_gateway_address;
ngx_uint_t union_station_gateway_port; ngx_uint_t union_station_gateway_port;
ngx_str_t union_station_gateway_cert; ngx_str_t union_station_gateway_cert;
ngx_str_t union_station_proxy_address;
ngx_str_t union_station_proxy_type;
ngx_array_t *prestart_uris; ngx_array_t *prestart_uris;
} passenger_main_conf_t; } passenger_main_conf_t;


Expand Down
8 changes: 8 additions & 0 deletions ext/nginx/ngx_http_passenger_module.c
Expand Up @@ -239,6 +239,8 @@ start_helper_server(ngx_cycle_t *cycle) {
char *analytics_log_permissions; char *analytics_log_permissions;
char *union_station_gateway_address; char *union_station_gateway_address;
char *union_station_gateway_cert; char *union_station_gateway_cert;
char *union_station_proxy_address;
char *union_station_proxy_type;
char *error_message = NULL; char *error_message = NULL;


core_conf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module); core_conf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module);
Expand All @@ -256,6 +258,8 @@ start_helper_server(ngx_cycle_t *cycle) {
analytics_log_permissions = ngx_str_null_terminate(&passenger_main_conf.analytics_log_permissions); analytics_log_permissions = ngx_str_null_terminate(&passenger_main_conf.analytics_log_permissions);
union_station_gateway_address = ngx_str_null_terminate(&passenger_main_conf.union_station_gateway_address); union_station_gateway_address = ngx_str_null_terminate(&passenger_main_conf.union_station_gateway_address);
union_station_gateway_cert = ngx_str_null_terminate(&passenger_main_conf.union_station_gateway_cert); union_station_gateway_cert = ngx_str_null_terminate(&passenger_main_conf.union_station_gateway_cert);
union_station_proxy_address = ngx_str_null_terminate(&passenger_main_conf.union_station_proxy_address);
union_station_proxy_type = ngx_str_null_terminate(&passenger_main_conf.union_station_proxy_type);


prestart_uris = (ngx_str_t *) passenger_main_conf.prestart_uris->elts; prestart_uris = (ngx_str_t *) passenger_main_conf.prestart_uris->elts;
prestart_uris_ary = calloc(sizeof(char *), passenger_main_conf.prestart_uris->nelts); prestart_uris_ary = calloc(sizeof(char *), passenger_main_conf.prestart_uris->nelts);
Expand Down Expand Up @@ -284,6 +288,8 @@ start_helper_server(ngx_cycle_t *cycle) {
union_station_gateway_address, union_station_gateway_address,
passenger_main_conf.union_station_gateway_port, passenger_main_conf.union_station_gateway_port,
union_station_gateway_cert, union_station_gateway_cert,
union_station_proxy_address,
union_station_proxy_type,
(const char **) prestart_uris_ary, passenger_main_conf.prestart_uris->nelts, (const char **) prestart_uris_ary, passenger_main_conf.prestart_uris->nelts,
starting_helper_server_after_fork, starting_helper_server_after_fork,
cycle, cycle,
Expand Down Expand Up @@ -355,6 +361,8 @@ start_helper_server(ngx_cycle_t *cycle) {
free(analytics_log_permissions); free(analytics_log_permissions);
free(union_station_gateway_address); free(union_station_gateway_address);
free(union_station_gateway_cert); free(union_station_gateway_cert);
free(union_station_proxy_address);
free(union_station_proxy_type);
free(error_message); free(error_message);
if (prestart_uris_ary != NULL) { if (prestart_uris_ary != NULL) {
for (i = 0; i < passenger_main_conf.prestart_uris->nelts; i++) { for (i = 0; i < passenger_main_conf.prestart_uris->nelts; i++) {
Expand Down

0 comments on commit 2c09250

Please sign in to comment.