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:
parent
92387475ac
commit
d0ba34ccae
3 changed files with 8 additions and 0 deletions
|
@ -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 }
|
||||
};
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ typedef enum which_t {
|
|||
allowconnect,
|
||||
pingtimeout,
|
||||
keyexpire,
|
||||
proxymode
|
||||
} which_t;
|
||||
|
||||
typedef struct config_t {
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue