Commit Graph

130 Commits

Author SHA1 Message Date
Adam Hamsik 5597c2a5a2 Merge pull request #115 from 7c6f434c/patch-1
Reinitialise i before using it for iterating over dll_dirs
2022-03-26 12:00:18 +01:00
Adam Hamsik 0ef3d6d5c8 Merge pull request #112 from sorki/fixWarnings
fix GCC strncpy warnings
2022-03-26 11:58:34 +01:00
Jack Hu d99c64bb78 Fix GCC errors in DEBUG mode
When we open debug mode(`./configure --devel`),
GCC will check `sign-conversion` and `conversion`.
It will cause some warnings.

Also add `-DDEBUG` to `CFLAGS` if we open debug
mode. This can open `PDEBUG()` and help you to get
detail information.

Signed-off-by: Jack Hu <spcreply@126.com>
2021-09-05 17:13:12 +08:00
Michael Raskin 3b1aac2084 Reinitialise i before using it for iterating over dll_dirs
Previously, the value of it was kept from the loop over all the command-line arguments; as `/usr/lib` or `/lib` were far enough in the list, on many systems there was no difference, but `own_dir` and `LIB_DIR` could be ignored or not based on the argument count, which was confusing.
2021-03-31 07:46:58 +00:00
Richard Marko 412ef4235b fix GCC strncpy warnings
Recent GCC added checks for this and it triggers `Werror` with

```
In function 'strncpy',
    inlined from 'proxy_gethostbyname' at src/core.c:832:2:
/nix/store/hayaj8q9rc7swx4llcjqymmg3zr525lx-glibc-2.32-25-dev/include/bits/string_fortified.h:91:10: error: '__builtin_strncpy' specified bound 8192 equals destination size [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wstringop-truncation-Werror=stringop-truncation8;;]
   91 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
    inlined from 'proxy_getaddrinfo' at src/core.c:917:3:
/nix/store/hayaj8q9rc7swx4llcjqymmg3zr525lx-glibc-2.32-25-dev/include/bits/string_fortified.h:91:10: error: '__builtin_strncpy' specified bound 256 equals destination size [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wstringop-truncation-Werror=stringop-truncation8;;]
   91 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
```
2021-02-13 11:14:08 +01:00
Alexandre Viau d27fcbff9b proxychains.conf: mention raw type 2020-12-10 11:42:49 -05:00
Adam Hamsik 5320c1bc22 Bump version string to 4.3.0 2020-12-10 14:04:16 +01:00
aviau 7b24b954c8 support 'raw' proxy type 2020-10-27 15:23:40 -04:00
Adam Hamsik 99af45703e Update libproxychains.c
Fix redundant parenthesis.
2020-07-28 16:15:00 +02:00
Adam Hamsik 5dd8450452 Merge pull request #99 from tomgilon/dnat
Add dnat feature
2020-07-21 22:41:19 +02:00
tom gilon d7096b4f98 Add option to change tcp destination port and ip before sending to proxy server 2020-05-07 00:10:59 +03:00
Adam Van Scyoc 6d1e0e8af6 Fix type on proxychains.conf fix_conf_file_type 2020-04-14 22:28:44 -04:00
Adam Hamsik e7a2b9d79a Merge pull request #88 from Mister-Meeseeks/master
Allow user to override default DNS server
2020-01-10 13:39:06 +01:00
Adam Hamsik f1ffbd4b94 Merge pull request #75 from tinyzimmer/master
optional set host on easy socks5 env var
2020-01-10 13:38:20 +01:00
Douglas R Colkitt 0416c2b7ea Fix issue with POSIX portability in proxyresolv script 2019-04-13 15:48:24 +00:00
Douglas R Colkitt 98e9326534 Allow user to override default DNS server
Implements support for an environmnet variable (PROXY_DNS_SERVER) whereby
the user can specify a DNS server. If not set defaults to the hardcoded
OpenDNS default.
2019-04-13 15:41:07 +00:00
intika 9f99278525 Fix security issue CVE-2015-3887 2019-01-22 13:25:35 +00:00
tinyzimmer f3b07370fb require cdefs 2018-04-22 21:42:33 -07:00
tinyzimmer dbe328efdd dont require cdefs 2018-04-22 21:36:52 -07:00
tinyzimmer f88610077c allow dynamic host for simple socks env var 2018-04-22 20:40:26 -07:00
Alex Flores fbfdd995db Merge pull request #73 from audibleblink/master
patch for random proxy selection
2018-04-12 21:55:02 -04:00
Alex Flores bd207014a2 patch for better random proxy selection 2018-04-12 21:35:23 -04:00
Julian Andres Klode e8e0b93b37 Fix compilation error in get_config_path()
When inlining check_path(), gcc sees after the first snprintf()
call that pbuf might be null, and subsequently generates a warning
for the next snprintf() call. Since the code (erroneously) builds
with -Werror, this causes it to fail.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83139
2017-11-24 11:10:28 +01:00
ZhiFeng Hu fdbce6cf24 Using OpenDNS and Drill (ldns-utils) 2014-11-28 13:45:02 +08:00
mingang.he a1ff3e0426 fix #43
"-t" should be "-f"
2014-06-30 20:18:14 +08:00
Adam Hamsik f52a3001e1 Merge tomsawyer changes while, Makefile changes were fixed in my previous commit.
Merge branch 'main_fixes' of git://github.com/tomsawyer/proxychains into tomsawyer-main_fixes

Conflicts:
	Makefile
2012-10-15 11:27:51 +02:00
Benjamin R. Haskell d3516a1c28 Add simple SOCKS5 proxy mode
If the environment variable PROXYCHAINS_SOCKS5 is set to a port number,
the configuration will be a single chain with a SOCKS5 proxy on
localhost:{that port}.

Additionally, setting the PROXYCHAINS_DNS environment variable (to any
value at all) will cause DNS queries to be proxied.
2012-10-12 15:39:03 -04:00
Semion Laptev 7aa95f9304 gethostbyname() and Makefile fixes 2012-10-10 19:19:12 +04:00
Adam Hamsik 4678bae604 Fix wrong glibc prototype. 2012-10-10 03:27:25 -07:00
Xie Zhenye d69f46afc5 Update src/proxyresolv
resolve hostname by local /etc/hosts file first
2012-09-22 22:17:53 +08:00
Adam Hamsik 1c020ced1e Port Proxychains to NetBSD. 2012-08-09 22:36:29 +00:00
Adam Hamsik 361889a2d2 Add option to do a development build with --devel configure flag. Rename proxy_getserverbyname to proxy_getservbyname. 2012-08-05 15:07:37 +02:00
Adam Hamsik cca0cea44a Fix couple of problems introduced/detected by clang checker and new -fno-common compiler flag. 2012-07-29 12:09:11 +02:00
Adam Hamsik 462e34f447 Add more strict warnings, make proxychains build with -Wconversion 2012-07-25 02:39:30 +02:00
Adam Hamsik 5b7270d75b Add new thread-safe getsrvbyname for MacOS X 2012-07-24 14:37:20 +02:00
Adam Hamsik e6b5f245f7 Merge branch 'rofl0r-master'
Conflicts:
	Makefile
	proxychains.lsm
	src/core.h
	src/libproxychains.c
	src/main.c
2012-07-24 14:02:18 +02:00
Adam Hamsik 8547764a82 Merge branch 'master' of https://github.com/rofl0r/proxychains into rofl0r-master
Conflicts:
	Makefile
	src/core.c
	src/core.h
	src/libproxychains.c
	src/main.c
2012-07-24 11:49:22 +02:00
rofl0r 40bb78b53f fix omission in common.c 2012-07-16 02:42:09 +02:00
rofl0r 80e58726e2 correct copyright of main.c 2012-07-16 02:36:35 +02:00
rofl0r ab3ca31871 getaddrinfo: cosmetics 2012-07-16 01:34:00 +02:00
rofl0r 037edbcb8e proxy_getaddrinfo: fix segfault when hints is NULL 2012-07-16 01:19:30 +02:00
rofl0r 40edf758ee make getaddrinfo threadsafe 2012-07-16 01:05:28 +02:00
rofl0r 4b999cdae7 use threadsafe getservbyname_r 2012-07-14 17:59:56 +02:00
rofl0r 71e15e2edd simplify log func 2012-07-14 17:59:06 +02:00
rofl0r e5e87c8f22 put abort functionality into get_config_path to further reduce code duplication 2012-07-08 23:47:56 +02:00
rofl0r fba5f5694c use config file lookup routine from a common place 2012-07-08 23:32:50 +02:00
rofl0r 3004240462 slightly better error message 2012-07-08 21:23:39 +02:00
rofl0r 364c785970 print everything to stderr, and fflush on PDEBUG 2012-07-08 04:18:42 +02:00
rofl0r 1fc7e38ee0 fixup for d95ef42d48 2012-07-08 04:09:50 +02:00
rofl0r 2c9c4d9da7 simplify load_sym code and remove potential aliasing violation. 2012-07-08 00:27:46 +02:00