A method for routing packets from an endpoint to a gateway includes receiving, by a driver of a process for providing secure communications to a gateway from an endpoint, a filtering table. The driver may intercept an outbound packet, the driver terminating a first transport layer connection with an application of the endpoint. The driver may transmit the outbound packet to a client application, responsive to the filtering table. The client application provides a second transport layer connection from the endpoint to the gateway. Responsive to an application of a policy to the outbound packet, the client application may transmit the outbound packet to the gateway.