IP Library Granted Patent US 11,533,381
Granted Patent B1
US 11,533,381 · App. 17/704,946 · Granted Dec 20, 2022

Method and system for transparent tcp proxy to containerized applications

Inventor: Alex John Hockey (Redmond, WA)
Assignee: Microsoft Technology Licensing, LLC
H04L67/56H04L67/2866H04L67/2876H04L67/2895H04L69/16
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,533,381
App. No.
17/704,946
Granted
Dec 20, 2022
Kind
B1
Abstract

Example aspects include techniques for implementing a transparent TCP proxy for containerized applications. These techniques may include receiving an outgoing packet from the containerized application via a container bridge and determining, based on a connection associated with the outgoing packet, whether the outgoing packet corresponds to an incoming packet identified by a first marking as being redirected through the TCP proxy. In addition, the techniques may include in response to determining that the outgoing packet corresponds to the incoming packet, adding a second marking to the outgoing packet to indicate that the outgoing packet is to be routed through the TCP proxy, sending the outgoing packet to the TCP proxy based on the second marking, and transmitting an outgoing processed packet to an external device having the destination address, the outgoing processed packet resulting from a performance of a proxy operation by the TCP proxy on the outgoing packet.

Claims (46)

1. A method for implementing a transmission control protocol (TCP) proxy for a containerized application executing within a container of a host machine wherein the containerized application employs a container network namespace of the container and the TCP proxy employs a host network namespace of the host machine, the method comprising:

receiving an outgoing packet from the containerized application via a container bridge, wherein the outgoing packet has a destination address external to the host machine;

determining, based on a connection associated with the outgoing packet, whether the outgoing packet corresponds to an incoming packet identified by a first marking as being redirected through the TCP proxy;

in response to determining that the outgoing packet corresponds to the incoming packet, adding a second marking to the outgoing packet to indicate that the outgoing packet is to be routed through the TCP proxy;

sending the outgoing packet to the TCP proxy based on the second marking, wherein sending the outgoing packet comprises reversing a first network address translation applied to the incoming packet; and

transmitting an outgoing processed packet to an external device having the destination address, the outgoing processed packet resulting from a performance of a proxy operation by the TCP proxy on the outgoing packet and wherein transmitting the outgoing processed packet comprises reversing a second network address translation applied to the incoming packet.

2. The method of claim 1 , wherein the proxy operation is an outgoing proxy operation, and further comprising:

generating, by the containerized application, via the container bridge, the outgoing packet based on processing an incoming processed packet;

wherein the incoming processed packet is received by the containerized application based on the first network address translation subsequent to an incoming proxy operation on the incoming packet.

3. The method of claim 2 , wherein the incoming packet is received by the TCP proxy based on a second network address translation, and wherein the first marking is applied by the TCP proxy to the incoming processed packet.

4. The method of claim 3 , wherein receiving the incoming packet at the TCP proxy is based upon the incoming packet having a TCP destination port associated with the containerized application.

5. The method of claim 1 , and further comprising:

configuring, by a container application providing virtualized services to the containerized application, a network stack of the host network namespace to route the outgoing packet to the TCP proxy based at least in part on the second marking.

6. The method of claim 1 , wherein the proxy operation includes an encryption operation and/or decryption operation.

7. The method of claim 1 , wherein the proxy operation includes a content filtering operation.

8. The method of claim 1 , wherein the proxy operation includes a layer 5 operation, a layer 6 operation, and/or a layer 7 operation.

9. The method of claim 1 , wherein the first marking or the second marking is a netfilter mark value.

10. A non-transitory computer-readable device having instructions thereon for implementing a transmission control protocol (TCP) proxy for a containerized application executing within a container of a host machine wherein the containerized application employs a container network namespace of the container and the TCP proxy employs a host network namespace of the host machine that, when executed by at least one computing device, cause the at least one computing device to perform operations comprising:

receiving an outgoing packet from the containerized application via a container bridge, wherein the outgoing packet has a destination address external to the host machine;

determining, based on a connection associated with the outgoing packet, whether the outgoing packet corresponds to an incoming packet identified by a first marking as being redirected through the TCP proxy;

in response to determining that the outgoing packet corresponds to the incoming packet, adding a second marking to the outgoing packet to indicate that the outgoing packet is to be routed through the TCP proxy;

sending the outgoing packet to the TCP proxy based on the second marking, wherein sending the outgoing packet comprises reversing a first network address translation applied to the incoming packet; and

transmitting an outgoing processed packet to an external device having the destination address, the outgoing processed packet resulting from a performance of a proxy operation by the TCP proxy on the outgoing packet and wherein transmitting the outgoing processed packet comprises reversing a second network address translation applied to the incoming packet.

11. The non-transitory computer-readable device of claim 10 , wherein the proxy operation is an outgoing proxy operation, and the operations further comprise:

generating, by the containerized application, via the container bridge, the outgoing packet based on processing an incoming processed packet;

wherein the incoming processed packet is received by the containerized application based on the first network address translation subsequent to an incoming proxy operation on the incoming packet.

12. The non-transitory computer-readable device of claim 11 , wherein the incoming packet is received by the TCP proxy based on a second network address translation, and wherein the first marking is applied by the TCP proxy to the incoming processed packet.

13. The non-transitory computer-readable device of claim 11 , wherein sending the incoming packet to the TCP proxy based upon the incoming packet being associated with the containerized application comprises routing the incoming packet to the TCP proxy based on a TCP destination port of the incoming packet being associated with the containerized application.

14. The non-transitory computer-readable device of claim 10 , wherein the operations further comprise:

configuring, by a container application providing virtualized services to the containerized application, a network stack to route the outgoing packet to the TCP proxy based at least in part on the second marking.

15. The non-transitory computer-readable device of claim 10 , wherein the proxy operation includes an encryption operation and/or a decryption operation.

16. The non-transitory computer-readable device of claim 10 , wherein the proxy operation includes a content filtering operation.

17. A system for implementing a transmission control protocol (TCP) proxy for a containerized application executing within a container of a host machine wherein the containerized application employs a container network namespace of the container and the TCP proxy employs a host network namespace of the host machine, the system comprising:

a memory storing instructions thereon; and

at least one processor coupled with the memory and configured by the instructions to:

receive an outgoing packet from the containerized application via a container bridge, wherein the outgoing packet has a destination address external to the host machine;

determine, based on a connection associated with the outgoing packet, whether the outgoing packet corresponds to an incoming packet identified by a first marking as being redirected through the TCP proxy;

in response to determining that the outgoing packet corresponds to the incoming packet, add a second marking to the outgoing packet to indicate that the outgoing packet is to be routed through the TCP proxy;

send the outgoing packet to the TCP proxy based on the second marking, wherein sending the outgoing packet comprises reversing a first network address translation applied to the incoming packet; and

transmit an outgoing processed packet to an external device having the destination address, the outgoing processed packet resulting from a performance of a proxy operation by the TCP proxy on the outgoing packet and wherein transmitting the outgoing processed packet comprises reversing a second network address translation applied to the incoming packet.

18. The system of claim 17 , wherein the proxy operation is a first operation, and the at least one processor is further configured by the instructions to:

configure, by a container application providing virtualized services to the containerized application, a network stack of the host network namespace to route the outgoing packet to the TCP proxy based at least in part on the second marking.

19. The system of claim 17 , wherein the proxy operation is an outgoing proxy operation, and the at least one processor is further configured by the instructions to:

generate, by the containerized application, via the container bridge, the outgoing packet based on processing an incoming processed packet;

wherein the incoming processed packet is received by the containerized application based on the first network address translation subsequent to an incoming proxy operation on the incoming packet.

20. The system of claim 17 , wherein the incoming packet is received by the TCP proxy based on a second network address translation, and wherein the first marking is applied by the TCP proxy to the incoming processed packet.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 17, 2022
From: HOCKEY, ALEX JOHN
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 059937/0018 →
Cited By (6)
US 12,481,978 US 12,488,321 US 12,518,257 US 12,549,391 US 12,562,889 US 12,568,152