Browse Source

use smaller UDP NAT cache

pull/140/head
Max Lv 10 years ago
parent
commit
0e74b87a22
4 changed files with 17 additions and 12 deletions
  1. 20
      configure
  2. 2
      configure.ac
  3. 1
      src/jconf.h
  4. 6
      src/udprelay.c

20
configure

@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for shadowsocks 1.4.8.
# Generated by GNU Autoconf 2.69 for shadowsocks 1.4.9.
# #
# Report bugs to <max.c.lv@gmail.com>. # Report bugs to <max.c.lv@gmail.com>.
# #
@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package. # Identity of this package.
PACKAGE_NAME='shadowsocks' PACKAGE_NAME='shadowsocks'
PACKAGE_TARNAME='shadowsocks' PACKAGE_TARNAME='shadowsocks'
PACKAGE_VERSION='1.4.8'
PACKAGE_STRING='shadowsocks 1.4.8'
PACKAGE_VERSION='1.4.9'
PACKAGE_STRING='shadowsocks 1.4.9'
PACKAGE_BUGREPORT='max.c.lv@gmail.com' PACKAGE_BUGREPORT='max.c.lv@gmail.com'
PACKAGE_URL='' PACKAGE_URL=''
@ -1328,7 +1328,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing. # Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
\`configure' configures shadowsocks 1.4.8 to adapt to many kinds of systems.
\`configure' configures shadowsocks 1.4.9 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1398,7 +1398,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of shadowsocks 1.4.8:";;
short | recursive ) echo "Configuration of shadowsocks 1.4.9:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
@ -1516,7 +1516,7 @@ fi
test -n "$ac_init_help" && exit $ac_status test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
shadowsocks configure 1.4.8
shadowsocks configure 1.4.9
generated by GNU Autoconf 2.69 generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc. Copyright (C) 2012 Free Software Foundation, Inc.
@ -2039,7 +2039,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by shadowsocks $as_me 1.4.8, which was
It was created by shadowsocks $as_me 1.4.9, which was
generated by GNU Autoconf 2.69. Invocation command line was generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@ $ $0 $@
@ -2860,7 +2860,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE='shadowsocks' PACKAGE='shadowsocks'
VERSION='1.4.8'
VERSION='1.4.9'
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
@ -15547,7 +15547,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their # report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. # values after options handling.
ac_log=" ac_log="
This file was extended by shadowsocks $as_me 1.4.8, which was
This file was extended by shadowsocks $as_me 1.4.9, which was
generated by GNU Autoconf 2.69. Invocation command line was generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
@ -15613,7 +15613,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\ ac_cs_version="\\
shadowsocks config.status 1.4.8
shadowsocks config.status 1.4.9
configured by $0, generated by GNU Autoconf 2.69, configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\" with options \\"\$ac_cs_config\\"

2
configure.ac

@ -2,7 +2,7 @@ dnl -*- Autoconf -*-
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.67]) AC_PREREQ([2.67])
AC_INIT([shadowsocks], [1.4.8], [max.c.lv@gmail.com])
AC_INIT([shadowsocks], [1.4.9], [max.c.lv@gmail.com])
AC_CONFIG_SRCDIR([src/encrypt.c]) AC_CONFIG_SRCDIR([src/encrypt.c])
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR(auto) AC_CONFIG_AUX_DIR(auto)

1
src/jconf.h

@ -25,7 +25,6 @@
#define MAX_REMOTE_NUM 10 #define MAX_REMOTE_NUM 10
#define MAX_CONF_SIZE 16 * 1024 #define MAX_CONF_SIZE 16 * 1024
#define DNS_THREAD_NUM 4 #define DNS_THREAD_NUM 4
#define MAX_UDP_CONN_NUM 4096
typedef struct typedef struct
{ {

6
src/udprelay.c

@ -57,6 +57,12 @@
#include "udprelay.h" #include "udprelay.h"
#include "cache.h" #include "cache.h"
#ifdef UDPRELAY_REMOTE
#define MAX_UDP_CONN_NUM 1024
#else
#define MAX_UDP_CONN_NUM 256
#endif
#ifdef UDPRELAY_REMOTE #ifdef UDPRELAY_REMOTE
#ifdef UDPRELAY_LOCAL #ifdef UDPRELAY_LOCAL
#error "UDPRELAY_REMOTE and UDPRELAY_LOCAL should not be both defined" #error "UDPRELAY_REMOTE and UDPRELAY_LOCAL should not be both defined"

Loading…
Cancel
Save