android: bind v4 server to real interface IP instead of 0.0.0.0
This commit is contained in:
1 parent
0492b19468
commit
ef115e0539
4 files changed
+31
-1
No files matched your search
+28
@@ -0,0 +1,28 @@
|
||||
/* confdefs.h */
|
||||
#define PACKAGE_NAME "utun"
|
||||
#define PACKAGE_TARNAME "utun"
|
||||
#define PACKAGE_VERSION "2.0.0"
|
||||
#define PACKAGE_STRING "utun 2.0.0"
|
||||
#define PACKAGE_BUGREPORT "https://github.com/anomalyco/utun3/issues"
|
||||
#define PACKAGE_URL ""
|
||||
#define PACKAGE "utun"
|
||||
#define VERSION "2.0.0"
|
||||
#define USE_OPENSSL 1
|
||||
#define HAVE_ARPA_INET_H 1
|
||||
#define HAVE_FCNTL_H 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_NETINET_IN_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_SYS_IOCTL_H 1
|
||||
#define HAVE_SYS_SOCKET_H 1
|
||||
#define HAVE_UNISTD_H 1
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_GETTIMEOFDAY 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_SOCKET 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRERROR 1
|
||||
#define HAVE_STRSTR 1
|
||||
@@ -0,0 +1,2 @@
|
||||
conftest.ts1: conftest.ts2
|
||||
touch conftest.ts2
|
||||
Binary file not shown.
@@ -307,7 +307,7 @@ class ConfigProvider(private val context: Context) {
|
||||
for (srv in servers) {
|
||||
val family = if (srv.bindIp.contains(":")) "v6" else "v4"
|
||||
appendLine("[server:${srv.ifName}_$family]")
|
||||
appendLine("addr=${if (family == "v6") "[::]" else "0.0.0.0"}:${srv.port}")
|
||||
appendLine("addr=${if (family == "v6") "[::]" else srv.bindIp.ifBlank { "0.0.0.0" }}:${srv.port}")
|
||||
appendLine("type=public")
|
||||
appendLine("transport=${srv.protocol}")
|
||||
if (family == "v6") appendLine("netif=${srv.ifName}")
|
||||
|
||||
Reference in new issue
Block a user