A controlled content
system for providing a controlled and contained environment that is remotely accessible is disclosed. A third-party application on the
end user device is modified to allow certain sites and services to be mediated in a mid-link
server. The third-party application uses policies to know when to access the mid-link
server for the controlled and contained environment. A
Hypertext Transfer Protocol (HTTP) stack for connection with remote services is based on the
network packet traffic identified by the policies as mediated targets. The HTTP stack is modified, or the HTTP stack is substituted with a mediated HTTP stack. A
Hypertext Transfer Protocol Secure (HTTPS) or a Virtual
Private Network (VPN) connection is configured to connect to the mid-link
server for the mediated targets, and for targets that are not mediated, the HTTP connection is configured between the
end user device and the targets without the mid-link server.