You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2013/07/29 22:05:59 UTC
[2/5] git commit: Remove proxy.config.http.server_other_ports
Remove proxy.config.http.server_other_ports
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/610df9f1
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/610df9f1
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/610df9f1
Branch: refs/heads/master
Commit: 610df9f1756046982d15e60cbe5995d48166b66d
Parents: 8390de2
Author: Leif Hedstrom <zw...@apache.org>
Authored: Fri Jul 26 09:48:05 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Mon Jul 29 21:52:05 2013 +0200
----------------------------------------------------------------------
doc/admin/transparent-proxy.en.rst | 11 ++---
lib/perl/lib/Apache/TS/AdminClient.pm | 1 -
mgmt/RecordsConfig.cc | 5 ---
mgmt/cli/CliCreateCommands.cc | 6 ---
mgmt/cli/ConfigCmd.cc | 70 -----------------------------
mgmt/cli/ConfigCmd.h | 14 ------
mgmt/cli/ShowCmd.cc | 51 ---------------------
mgmt/cli/ShowCmd.h | 4 --
mgmt/cli/cli_detailed_command_list.txt | 13 ------
proxy/http/HttpConfig.cc | 2 -
proxy/http/HttpConfig.h | 5 +--
11 files changed, 5 insertions(+), 177 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/610df9f1/doc/admin/transparent-proxy.en.rst
----------------------------------------------------------------------
diff --git a/doc/admin/transparent-proxy.en.rst b/doc/admin/transparent-proxy.en.rst
index dcbb977..aa91e38 100644
--- a/doc/admin/transparent-proxy.en.rst
+++ b/doc/admin/transparent-proxy.en.rst
@@ -82,10 +82,9 @@ Standard build procedures should work for transparency support but if
not consult these `more detailed instructions <build>`_
Transparency is configured per server port not globally. This is done
-via the configuration values ``proxy.config.http.server_port_attr`` and
-``proxy.config.http.server_other_ports``. In addition,
-``proxy.config.reverse_proxy_enabled`` must be enabled if the client
-side is transparent. That should be fixed in a future patch.
+via the configuration values ``proxy.config.http.server_port_attr``.
+In addition, ``proxy.config.reverse_proxy_enabled`` must be enabled if the
+client side is transparent. That should be fixed in a future patch.
In the first case use the attribute character (replacing the default
'X')
@@ -105,10 +104,6 @@ In the outbound transparent case clients must connect directly to ATS
either through an explicit proxy mechanism or by advertising the IP
address of the ATS server via DNS as the origin server address.
-For ``.server_other_ports`` use the same characters after the port and
-colon, e.g. if port 8088 is to be configured for client side
-transparency use '``8088:>``\ '.
-
Some tested scenarios --
- `Transparent bridging <bridge>`_
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/610df9f1/lib/perl/lib/Apache/TS/AdminClient.pm
----------------------------------------------------------------------
diff --git a/lib/perl/lib/Apache/TS/AdminClient.pm b/lib/perl/lib/Apache/TS/AdminClient.pm
index bf97ea6..e85c7c6 100644
--- a/lib/perl/lib/Apache/TS/AdminClient.pm
+++ b/lib/perl/lib/Apache/TS/AdminClient.pm
@@ -514,7 +514,6 @@ The Apache Traffic Server Administration Manual will explain what these strings
proxy.config.http.response_via_str
proxy.config.http.send_http11_requests
proxy.config.http.server_max_connections
- proxy.config.http.server_other_ports
proxy.config.http.server_port
proxy.config.http.server_port_attr
proxy.config.http.share_server_sessions
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/610df9f1/mgmt/RecordsConfig.cc
----------------------------------------------------------------------
diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index 4e3b5d1..39931ad 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -377,9 +377,6 @@ RecordElement RecordsConfig[] = {
// # The main server_port is listed here, other server ports is a
// # string of ports, separated by whitespace.
// #
- // # The port attributes should be set to X(default behavior). For
- // # example ...server_other_ports STRING 1234:X 12345:X
- // #
{RECT_CONFIG, "proxy.config.http.enabled", RECD_INT, "1", RECU_RESTART_TM, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
,
{RECT_CONFIG, "proxy.config.http.server_ports", RECD_STRING, NULL, RECU_RESTART_TM, RR_NULL, RECC_NULL, NULL, RECA_NULL}
@@ -388,8 +385,6 @@ RecordElement RecordsConfig[] = {
,
{RECT_CONFIG, "proxy.config.http.server_port_attr", RECD_STRING, "X", RECU_RESTART_TM, RR_NULL, RECC_NULL, NULL, RECA_NULL}
,
- {RECT_CONFIG, "proxy.config.http.server_other_ports", RECD_STRING, NULL, RECU_RESTART_TM, RR_NULL, RECC_NULL, NULL, RECA_NULL}
- ,
{RECT_CONFIG, "proxy.config.http.wait_for_cache", RECD_INT, "0", RECU_RESTART_TM, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
,
{RECT_CONFIG, "proxy.config.http.insert_request_via_str", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/610df9f1/mgmt/cli/CliCreateCommands.cc
----------------------------------------------------------------------
diff --git a/mgmt/cli/CliCreateCommands.cc b/mgmt/cli/CliCreateCommands.cc
index 3d35a67..5a22207 100644
--- a/mgmt/cli/CliCreateCommands.cc
+++ b/mgmt/cli/CliCreateCommands.cc
@@ -91,9 +91,6 @@ CliCreateCommands()
createCommand("show:socks", Cmd_ShowSocks, CmdArgs_ShowSocks, CLI_COMMAND_EXTERNAL,
"show:socks", "SOCKS configuration");
- createCommand("show:port-tunnels", Cmd_ShowPortTunnels, NULL, CLI_COMMAND_EXTERNAL,
- "show:port-tunnels", "Port tunnels configuration");
-
createCommand("show:scheduled-update", Cmd_ShowScheduledUpdate, CmdArgs_ShowScheduledUpdate, CLI_COMMAND_EXTERNAL,
"show:scheduled-update", "Scheduled update configuration");
@@ -179,9 +176,6 @@ CliCreateCommands()
"config:icp multicast <on | off>\n"
"config:icp query-timeout <seconds>\n" "config:icp peers <url-config-file>", "Configure ICP");
- createCommand("config:port-tunnels", Cmd_ConfigPortTunnels, CmdArgs_ConfigPortTunnels, CLI_COMMAND_EXTERNAL,
- "config:port-tunnels server-other-ports <port>", "Configure Port Tunnels");
-
createCommand("config:scheduled-update", Cmd_ConfigScheduledUpdate, CmdArgs_ConfigScheduledUpdate,
CLI_COMMAND_EXTERNAL,
"config:scheduled-update status <on | off>\n" "config:scheduled-update retry-count <int>\n"
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/610df9f1/mgmt/cli/ConfigCmd.cc
----------------------------------------------------------------------
diff --git a/mgmt/cli/ConfigCmd.cc b/mgmt/cli/ConfigCmd.cc
index bdd4502..a40da20 100644
--- a/mgmt/cli/ConfigCmd.cc
+++ b/mgmt/cli/ConfigCmd.cc
@@ -718,7 +718,6 @@ Cmd_ConfigPorts(ClientData clientData, Tcl_Interp * interp, int argc, const char
return (ConfigPortsGet(argtable[0].parsed_args));
} else { // set
switch (argtable->parsed_args) {
- case CMD_CONFIG_PORTS_HTTP_OTHER:
case CMD_CONFIG_PORTS_CONNECT:
return (ConfigPortsSet(argtable[0].parsed_args, argtable[0].data));
break;
@@ -748,8 +747,6 @@ CmdArgs_ConfigPorts()
{
createArgument("http-server", 1, CLI_ARGV_OPTION_INT_VALUE,
(char *) NULL, CMD_CONFIG_PORTS_HTTP_SERVER, "Set Ports for http-server", (char *) NULL);
- createArgument("http-other", 1, CLI_ARGV_OPTION_NAME_VALUE,
- (char *) NULL, CMD_CONFIG_PORTS_HTTP_OTHER, "Set Ports for http-other", (char *) NULL);
createArgument("cluster", 1, CLI_ARGV_OPTION_INT_VALUE,
(char *) NULL, CMD_CONFIG_PORTS_CLUSTER, "Set Ports for cluster", (char *) NULL);
createArgument("cluster-rs", 1, CLI_ARGV_OPTION_INT_VALUE,
@@ -1168,58 +1165,6 @@ CmdArgs_ConfigIcp()
}
////////////////////////////////////////////////////////////////
-// Cmd_ConfigPortTunnels
-//
-// This is the callback function for the "config:port-tunnels" command.
-//
-// Parameters:
-// clientData -- information about parsed arguments
-// interp -- the Tcl interpreter
-// argc -- number of command arguments
-// argv -- the command arguments
-//
-int
-Cmd_ConfigPortTunnels(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
- /* call to processArgForCommand must appear at the beginning
- * of each command's callback function
- */
- if (processArgForCommand(interp, argc, argv) != CLI_OK) {
- return CMD_ERROR;
- }
-
- if (processHelpCommand(argc, argv) == CLI_OK)
- return CMD_OK;
-
- if (cliCheckIfEnabled("config:port-tunnel") == CLI_ERROR) {
- return CMD_ERROR;
- }
- Cli_Debug("Cmd_ConfigPortTunnles argc %d\n", argc);
-
- cli_cmdCallbackInfo *cmdCallbackInfo;
- cli_parsedArgInfo *argtable;
-
- cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
- argtable = cmdCallbackInfo->parsedArgTable;
-
- if (argtable->parsed_args != CLI_PARSED_ARGV_END) {
- switch (argtable->parsed_args) {
- case CMD_CONFIG_PORT_TUNNELS_SERVER_OTHER_PORTS:
- int status = Cli_RecordInt_Action((argc == 3),
- "proxy.config.http.server_other_ports",
- argtable->arg_int);
- Cli_Printf("\n");
- Cli_Printf("Use config:remap to add rules to the remap.config file as follows:\n");
- Cli_Printf("map tunnel://<proxy_ip>:<port_num>/tunnel://<dest_server>:<dest_port>\n");
- Cli_Printf("\n");
- return status;
- }
- }
- Cli_Error(ERR_COMMAND_SYNTAX, cmdCallbackInfo->command_usage);
- return CMD_ERROR;
-}
-
-////////////////////////////////////////////////////////////////
// CmdArgs_ConfigPortTunnles
//
// Register "config:PortTunnles" arguments with the Tcl interpreter.
@@ -2438,7 +2383,6 @@ ConfigPortsSet(int arg_ref, void *valuePtr)
{
switch (arg_ref) {
- case CMD_CONFIG_PORTS_HTTP_OTHER:
case CMD_CONFIG_PORTS_CONNECT:
Cli_Debug("ConfigPortsSet: arg_ref %d value %s\n", arg_ref, (char *) valuePtr);
break;
@@ -2454,9 +2398,6 @@ ConfigPortsSet(int arg_ref, void *valuePtr)
case CMD_CONFIG_PORTS_HTTP_SERVER:
status = Cli_RecordSetInt("proxy.config.http.server_port", *(TSInt *) valuePtr, &action_need);
break;
- case CMD_CONFIG_PORTS_HTTP_OTHER:
- status = Cli_RecordSetString("proxy.config.http.server_other_ports", (TSString) valuePtr, &action_need);
- break;
case CMD_CONFIG_PORTS_CLUSTER:
status = Cli_RecordSetInt("proxy.config.cluster.cluster_port", *(TSInt *) valuePtr, &action_need);
break;
@@ -2505,17 +2446,6 @@ ConfigPortsGet(int arg_ref)
}
Cli_Printf("%d\n", int_val);
break;
- case CMD_CONFIG_PORTS_HTTP_OTHER:
- status = Cli_RecordGetString("proxy.config.http.server_other_ports", &str_val);
- if (status) {
- return status;
- }
- if (str_val) {
- Cli_Printf("%s\n", str_val);
- } else {
- Cli_Printf("none\n");
- }
- break;
case CMD_CONFIG_PORTS_CLUSTER:
status = Cli_RecordGetInt("proxy.config.cluster.cluster_port", &int_val);
if (status) {
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/610df9f1/mgmt/cli/ConfigCmd.h
----------------------------------------------------------------------
diff --git a/mgmt/cli/ConfigCmd.h b/mgmt/cli/ConfigCmd.h
index 6494f4b..42ed681 100644
--- a/mgmt/cli/ConfigCmd.h
+++ b/mgmt/cli/ConfigCmd.h
@@ -48,7 +48,6 @@ typedef enum
CMD_CONFIG_RESTART_CLUSTER,
CMD_CONFIG_PORTS,
CMD_CONFIG_PORTS_HTTP_SERVER,
- CMD_CONFIG_PORTS_HTTP_OTHER,
CMD_CONFIG_PORTS_CLUSTER,
CMD_CONFIG_PORTS_CLUSTER_RS,
CMD_CONFIG_PORTS_CLUSTER_MC,
@@ -414,19 +413,6 @@ int Cmd_ConfigPorts(ClientData clientData, Tcl_Interp * interp, int argc, const
int CmdArgs_ConfigPorts();
////////////////////////////////////////////////////////////////
-// Cmd_ConfigPortTunnles
-//
-// This is the callback function for the "config:port-tunnels" command.
-//
-// Parameters:
-// clientData -- information about parsed arguments
-// interp -- the Tcl interpreter
-// argc -- number of command arguments
-// argv -- the command arguments
-//
-int Cmd_ConfigPortTunnels(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-
-////////////////////////////////////////////////////////////////
// CmdArgs_ConfigPortTunnles
//
// Register "config:PortTunnles" arguments with the Tcl interpreter.
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/610df9f1/mgmt/cli/ShowCmd.cc
----------------------------------------------------------------------
diff --git a/mgmt/cli/ShowCmd.cc b/mgmt/cli/ShowCmd.cc
index 3024dd5..0798c43 100644
--- a/mgmt/cli/ShowCmd.cc
+++ b/mgmt/cli/ShowCmd.cc
@@ -701,35 +701,6 @@ CmdArgs_ShowSocks()
}
////////////////////////////////////////////////////////////////
-// Cmd_ShowPortTunnels
-//
-// This is the callback function for the "show:port-tunnels" command.
-//
-// Parameters:
-// clientData -- information about parsed arguments
-// interp -- the Tcl interpreter
-// argc -- number of command arguments
-// argv -- the command arguments
-//
-int
-Cmd_ShowPortTunnels(ClientData /* clientData ATS_UNUSED */, Tcl_Interp * interp, int argc, const char *argv[])
-{
- /* call to processArgForCommand must appear at the beginning
- * of each command's callback function
- */
- if (processArgForCommand(interp, argc, argv) != CLI_OK) {
- return CMD_ERROR;
- }
-
- if (processHelpCommand(argc, argv) == CLI_OK)
- return CMD_OK;
-
- Cli_Debug("Cmd_ShowPortTunnels\n");
-
- return (ShowPortTunnels());
-}
-
-////////////////////////////////////////////////////////////////
// Cmd_ShowScheduledUpdate
//
// This is the callback function for the "show:scheduled-update" command.
@@ -1216,7 +1187,6 @@ ShowHttp()
Cli_RecordGetInt("proxy.config.http.anonymize_insert_client_ip", &insert_client_ip);
Cli_RecordGetInt("proxy.config.http.anonymize_remove_client_ip", &remove_client_ip);
Cli_RecordGetInt("proxy.config.http.server_port", &http_server);
- Cli_RecordGetString("proxy.config.http.server_other_ports", &http_other);
Cli_RecordGetString("proxy.config.http.global_user_agent_header", &global_user_agent);
@@ -1856,27 +1826,6 @@ ShowSocksRules()
return status;
}
-// show port-tunnels sub-command
-int
-ShowPortTunnels()
-{
- TSString str_val = NULL;
- TSError status = TS_ERR_OKAY;
-
- status = Cli_RecordGetString("proxy.config.http.server_other_ports", &str_val);
- if (status) {
- return status;
- }
- Cli_Printf("\n");
- Cli_Printf("server-other-ports -- %s\n", str_val);
- Cli_Printf("\n");
- Cli_Printf("To view the corresponding rule of the remap.config file in the following format\n");
- Cli_Printf("map tunnel://<proxy_ip>:<port_num>/tunnel://<dest_server>:<dest_port>\n");
- Cli_Printf("Use show:remap\n");
- Cli_Printf("\n");
- return CLI_OK;
-}
-
// show scheduled-update sub-command
int
ShowScheduledUpdate()
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/610df9f1/mgmt/cli/ShowCmd.h
----------------------------------------------------------------------
diff --git a/mgmt/cli/ShowCmd.h b/mgmt/cli/ShowCmd.h
index cbc7cbf..ab9a8c6 100644
--- a/mgmt/cli/ShowCmd.h
+++ b/mgmt/cli/ShowCmd.h
@@ -116,7 +116,6 @@ int CmdArgs_ShowParents();
int Cmd_ShowRemap(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
int Cmd_ShowSocks(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
int CmdArgs_ShowSocks();
-int Cmd_ShowPortTunnels(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
int Cmd_ShowScheduledUpdate(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
int CmdArgs_ShowScheduledUpdate();
int Cmd_ShowProxyStats(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
@@ -208,9 +207,6 @@ int ShowSocks();
// show:socks rules sub-command
int ShowSocksRules();
-// show port-tunnels sub-command
-int ShowPortTunnels();
-
// show scheduled-update sub-command
int ShowScheduledUpdate();
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/610df9f1/mgmt/cli/cli_detailed_command_list.txt
----------------------------------------------------------------------
diff --git a/mgmt/cli/cli_detailed_command_list.txt b/mgmt/cli/cli_detailed_command_list.txt
index cbdd113..54b2776 100644
--- a/mgmt/cli/cli_detailed_command_list.txt
+++ b/mgmt/cli/cli_detailed_command_list.txt
@@ -357,7 +357,6 @@ http HTTP Configuration
ts> show:http
HTTP Caching ------------------ on (proxy.config.http.cache.http)
HTTP Server Port -------------- 14980 (proxy.config.http.server_port)
- HTTP Other Ports -------------- NULL (proxy.config.http.server_other_ports)
Keep-Alive Timeout Inbound ---- 10 s (proxy.config.http.keep_alive_no_activity_timeout_in)
Keep-Alive Timeout Outbound --- 10 s (proxy.config.http.keep_alive_no_activity_timeout_out)
@@ -1398,7 +1397,6 @@ ports Ports used by Traffic Server
ssl | socks-server | icp> <port | ports>
args: some variables are single-port while other can be a list of ports
<http-server> (proxy.config.http.server_port) single
- <http-other> (proxy.config.http.server_other_ports) list
<cluster> (proxy.config.cluster_port) single
<cluster-rs> (proxy.config.cluster.rsport) single
<cluster-mc> (proxy.config.cluster.mcport) single
@@ -1426,17 +1424,6 @@ socks SOCKS Configuration
ts# config:socks accept-port 1080
ts#
-port-tunnels Port Tunnelling Configuration
-
- syntax: config:port-tunnels server-other-ports <port>
- args: other-ports (proxy.config.http.server_other_ports)
-
- ts# config:port-tunnels
- ts# NULL
- ts# config:port-tunnels other-ports 5678
- ts#
-
-
scheduled-update Scheduled Update Configuration
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/610df9f1/proxy/http/HttpConfig.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpConfig.cc b/proxy/http/HttpConfig.cc
index 385429b..cf7eedc 100644
--- a/proxy/http/HttpConfig.cc
+++ b/proxy/http/HttpConfig.cc
@@ -1171,7 +1171,6 @@ HttpConfig::startup()
HttpEstablishStaticConfigStringAlloc(c.url_expansions_string, "proxy.config.dns.url_expansions");
HttpEstablishStaticConfigLongLong(c.proxy_server_port, "proxy.config.http.server_port");
- HttpEstablishStaticConfigStringAlloc(c.proxy_server_other_ports, "proxy.config.http.server_other_ports");
HttpEstablishStaticConfigByte(c.oride.keep_alive_enabled_in, "proxy.config.http.keep_alive_enabled_in");
HttpEstablishStaticConfigByte(c.oride.keep_alive_enabled_out, "proxy.config.http.keep_alive_enabled_out");
HttpEstablishStaticConfigByte(c.oride.chunking_enabled, "proxy.config.http.chunking_enabled");
@@ -1445,7 +1444,6 @@ HttpConfig::reconfigure()
params->url_expansions = parse_url_expansions(params->url_expansions_string, ¶ms->num_url_expansions);
params->proxy_server_port = m_master.proxy_server_port;
- params->proxy_server_other_ports = ats_strdup(m_master.proxy_server_other_ports);
params->oride.keep_alive_enabled_in = INT_TO_BOOL(m_master.oride.keep_alive_enabled_in);
params->oride.keep_alive_enabled_out = INT_TO_BOOL(m_master.oride.keep_alive_enabled_out);
params->oride.chunking_enabled = INT_TO_BOOL(m_master.oride.chunking_enabled);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/610df9f1/proxy/http/HttpConfig.h
----------------------------------------------------------------------
diff --git a/proxy/http/HttpConfig.h b/proxy/http/HttpConfig.h
index 83d8773..e2f9ddb 100644
--- a/proxy/http/HttpConfig.h
+++ b/proxy/http/HttpConfig.h
@@ -649,7 +649,7 @@ public:
// connection variables. timeouts are in seconds //
///////////////////////////////////////////////////
MgmtInt proxy_server_port;
- char *proxy_server_other_ports;
+ MgmtByte session_auth_cache_keep_alive_enabled;
MgmtInt origin_server_pipeline;
MgmtInt user_agent_pipeline;
MgmtInt transaction_active_timeout_in;
@@ -908,7 +908,7 @@ HttpConfigParams::HttpConfigParams()
url_expansions(0),
num_url_expansions(0),
proxy_server_port(0),
- proxy_server_other_ports(0),
+ session_auth_cache_keep_alive_enabled(0),
origin_server_pipeline(0),
user_agent_pipeline(0),
transaction_active_timeout_in(0),
@@ -967,7 +967,6 @@ HttpConfigParams::~HttpConfigParams()
ats_free(proxy_request_via_string);
ats_free(proxy_response_via_string);
ats_free(url_expansions_string);
- ats_free(proxy_server_other_ports);
ats_free(anonymize_other_header_list);
ats_free(global_user_agent_header);
ats_free(oride.proxy_response_server_string);