Network traffic management using port number redirection
A first request is received from a device over a network. It is determined that the first request should be redirected, based at least in part on information included in the first request. A redirect message is sent to the device over the network. A second request is received that includes the address and the port number. Responsive to determining that the port number is on the predetermined list of port numbers, modifying the second request by removing the port number. The modified second request is sent to the address.
1. A method performed by data processing apparatuses, the method comprising:
receiving, from a device over a network, a first request that includes an address;
in response to receiving the first request, determining, based at least in part on information included in the first request, that the first request is to be redirected;
in response to determining that the first request is to be redirected, selecting a first port number out of a collection of possible port numbers wherein selecting a first port number out of a collection of possible port numbers comprises:
identifying a handling rule for handling the request;
identifying a port number that is associated with the handling rule;
sending, by a network gateway and to the device over the network, a redirect message that includes the address and the first port number;
receiving, by a proxy server that is a different device than the network gateway and from the device over the network, a second request that includes the address and the first port number, wherein the proxy server serves resources through the Web Cache Communication Protocol (WCCP);
determining that the first port number is included in a predetermined list of first port numbers;
responsive to determining that the first port number is on the predetermined list of port numbers, modifying the second request by removing the first port number wherein modifying the second request by removing the first port number comprises modifying the second request according to the handling rule; and
sending the modified second request to the address.
2. The method of claim 1 , wherein determining that the first port number is included in a predetermined list of port numbers comprises determining that the first port number is one of the collection of possible port numbers.
3. The method of claim 1 , wherein the address includes a second port number different than the first port number, and modifying the second request includes inserting the second port number into the second request.
4. The method of claim 1 , wherein the proxy server is configured to perform, for at least some network traffic, at least one of the group consisting of sandboxing traffic, caching resources, logging traffic, and blocking traffic.
5. A system comprising:
at least one processor; and
computer-readable media having tangibly encoded instructions that, when executed by the at least one processor, cause the at least one processor to perform operations comprising:
receiving, from a device over a network, a first request that includes an address;
in response to receiving the first request, determining, based at least in part on information included in the first request, that the first request is to be redirected;
in response to determining that the first request is to be redirected, selecting a first port number out of a collection of possible port numbers wherein selecting a first port number out of a collection of possible port numbers comprises:
identifying a handling rule for handling the request;
identifying a port number that is associated with the handling rule;
sending, by a network gateway and to the device over the network, a redirect message that includes the address and the first port number;
receiving, by a proxy server that is a different device than the network gateway and from the device over the network, a second request that includes the address and the first port number, wherein the proxy server serves resources through the Web Cache Communication Protocol (WCCP);
determining that the first port number is included in a predetermined list of first port numbers;
responsive to determining that the first port number is on the predetermined list of port numbers, modifying the second request by removing the first port number wherein modifying the second request by removing the first port number comprises modifying the second request according to the handling rule; and
sending the modified second request to the address.
6. The system of claim 5 , wherein determining that the first port number is included in a predetermined list of port numbers comprises determining that the first port number is one of the collection of possible port numbers.
7. The system of claim 5 , wherein the address includes a second port number different than the first port number, and modifying the second request includes inserting the second port number into the second request.
8. The system of claim 5 , wherein the proxy server is configured to perform, for at least some network traffic, at least one of the group consisting of sandboxing traffic, caching resources, logging traffic, and blocking traffic.
9. A non-transitory computer-readable media having tangibly encoded instructions that, when executed by at least one processor, cause the at least one processor to perform operations comprising:
receiving, from a device over a network, a first request that includes an address;
in response to receiving the first request, determining, based at least in part on information included in the first request, that the first request is to be redirected;
in response to determining that the first request is to be redirected, selecting a first port number out of a collection of possible port numbers wherein selecting a first port number out of a collection of possible port numbers comprises:
identifying a handling rule for handling the request;
identifying a port number that is associated with the handling rule;
sending, by a network gateway and to the device over the network, a redirect message that includes the address and the first port number;
receiving, by a proxy server that is a different device than the network gateway and from the device over the network, a second request that includes the address and the first port number, wherein the proxy server serves resources through the Web Cache Communication Protocol (WCCP);
determining that the first port number is included in a predetermined list of first port numbers;
responsive to determining that the first port number is on the predetermined list of port numbers, modifying the second request by removing the first port number wherein modifying the second request by removing the first port number comprises modifying the second request according to the handling rule; and
sending the modified second request to the address.
10. The computer-readable media of claim 9 , wherein determining that the first port number is included in a predetermined list of port numbers comprises determining that the first port number is one of the collection of possible port numbers.
11. The computer-readable media of claim 9 , wherein the address includes a second port number different than the first port number, and modifying the second request includes inserting the second port number into the second request.
12. The computer-readable media of claim 9 , wherein the proxy server is configured to perform, for at least some network traffic, at least one of the group consisting of sandboxing traffic, caching resources, logging traffic, and blocking traffic.