An approach for adaptively providing network performance enhancing
functions in a secure environment, such as a virtual private network, is
disclosed. Traffic, for example, Internet Protocol (IP) packets, is
received for transport over an access network (e.g., satellite network).
Next, characteristics (e.g., latency) of the access network are
determined. A connection (which supports the performance enhancing
functions) is selectively established based on the determined
characteristics for transport the received packets over the access
network. An encrypted tunnel is provided over the established connection
to transmit the received packets.