Added new config variable "ProxyMode". If enabled, all outgoing packets

are sent to the uplink (ConnectTo), which will have to forward them for
us (kernel should do that). This is for people behind firewalls.
This commit is contained in:
Guus Sliepen 2000-05-08 18:44:15 +00:00
parent 92387475ac
commit d0ba34ccae
3 changed files with 8 additions and 0 deletions

View file

@ -59,6 +59,7 @@ static internal_config_t hazahaza[] = {
{ "PingTimeout", pingtimeout, TYPE_INT },
{ "TapDevice", tapdevice, TYPE_NAME },
{ "KeyExpire", keyexpire, TYPE_INT },
{ "ProxyMode", proxymode, TYPE_BOOL },
{ NULL, 0, 0 }
};

View file

@ -41,6 +41,7 @@ typedef enum which_t {
allowconnect,
pingtimeout,
keyexpire,
proxymode
} which_t;
typedef struct config_t {

View file

@ -258,8 +258,14 @@ cp
*/
int send_packet(ip_t to, vpn_packet_t *packet)
{
config_t const *cfg;
conn_list_t *cl;
cp
if(!(cfg = get_config_val(proxymode))) /* In case we are in proxy mode, just send everything to our uplink. */
cl = conn_list;
else
cl = lookup_conn(to);
if((cl = lookup_conn(to)) == NULL)
{
if(debug_lvl > 2)