BadVPN – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | /* |
2 | * Copyright (C) Ambroz Bizjak <ambrop7@gmail.com> |
||
3 | * |
||
4 | * Redistribution and use in source and binary forms, with or without |
||
5 | * modification, are permitted provided that the following conditions are met: |
||
6 | * 1. Redistributions of source code must retain the above copyright |
||
7 | * notice, this list of conditions and the following disclaimer. |
||
8 | * 2. Redistributions in binary form must reproduce the above copyright |
||
9 | * notice, this list of conditions and the following disclaimer in the |
||
10 | * documentation and/or other materials provided with the distribution. |
||
11 | * 3. Neither the name of the author nor the |
||
12 | * names of its contributors may be used to endorse or promote products |
||
13 | * derived from this software without specific prior written permission. |
||
14 | * |
||
15 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
||
16 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
||
17 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
||
18 | * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY |
||
19 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
||
20 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
||
21 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
||
22 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||
23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
||
24 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||
25 | */ |
||
26 | |||
27 | // name of the program |
||
28 | #define PROGRAM_NAME "tun2socks" |
||
29 | |||
30 | // size of temporary buffer for passing data from the SOCKS server to TCP for sending |
||
31 | #define CLIENT_SOCKS_RECV_BUF_SIZE 8192 |
||
32 | |||
33 | // maximum number of udpgw connections |
||
34 | #define DEFAULT_UDPGW_MAX_CONNECTIONS 256 |
||
35 | |||
36 | // udpgw per-connection send buffer size, in number of packets |
||
37 | #define DEFAULT_UDPGW_CONNECTION_BUFFER_SIZE 8 |
||
38 | |||
39 | // udpgw reconnect time after connection fails |
||
40 | #define UDPGW_RECONNECT_TIME 5000 |
||
41 | |||
42 | // udpgw keepalive sending interval |
||
43 | #define UDPGW_KEEPALIVE_TIME 10000 |
||
44 | |||
45 | // option to override the destination addresses to give the SOCKS server |
||
46 | //#define OVERRIDE_DEST_ADDR "10.111.0.2:2000" |
||
47 | |||
48 | // Max number of buffered outgoing UDP packets for SOCKS5-UDP. It should be large |
||
49 | // enough to prevent packet loss while the SOCKS UDP association is being set up. A slow |
||
50 | // or far-away SOCKS server could require 300 ms to connect, and a chatty client (e.g. |
||
51 | // STUN) could send a packet every 20 ms, so a default limit of 16 seems reasonable. |
||
52 | #define SOCKS_UDP_SEND_BUFFER_PACKETS 16 |