A method comprising, when a communication session is initiated by a client device with an origin server over a network , the steps of determining, by a terminal facilitating communication between the client device and a remotely located gateway over a first network, if messages for the establishment of the communication session contain state information associated with a secure session; querying a first database within the terminal for an internet protocol, IP, address of the origin server , if the messages do not contain state information, the first database containing, at least in part, one or more bypass IP addresses corresponding to IP addresses of origin servers that are known to require the exchange of various types of state information and/or require secure communication sessions; establishing , by the terminal , the communication session directly with the origin server via the gateway and over a public network connecting the gateway and the origin server if the messages contain state information or if the IP address of the origin server is present in the first database ; updating , by the terminal , a second database within the terminal with a symbolic name of the origin server if the communication session is established directly with the origin server , the second database containing, at least in part, one or more symbolic names of origin servers that are known to require state information and/or secure communication sessions; and if the messages do not contain state information and if the IP address of the origin server is not present in the first database establishing, by the terminal , the communication session, via a proxy server within the gateway and over the public network connecting the gateway and the origin server, with the origin server . determining, by a terminal facilitating communication between the client device and a remotely located gateway over a first network, if messages for the establishment of the communication session contain state information associated with a secure session; querying a first database within the terminal for an internet protocol, IP, address of the origin server , if the messages do not contain state information, the first database containing, at least in part, one or more bypass IP addresses corresponding to IP addresses of origin servers that are known to require the exchange of various types of state information and/or require secure communication sessions; establishing , by the terminal , the communication session directly with the origin server via the gateway and over a public network connecting the gateway and the origin server if the messages contain state information or if the IP address of the origin server is present in the first database ; updating , by the terminal , a second database within the terminal with a symbolic name of the origin server if the communication session is established directly with the origin server , the second database containing, at least in part, one or more symbolic names of origin servers that are known to require state information and/or secure communication sessions; and if the messages do not contain state information and if the IP address of the origin server is not present in the first database establishing, by the terminal , the communication session, via a proxy server within the gateway and over the public network connecting the gateway and the origin server, with the origin server . <EOS>