0
0
mirror of https://github.com/darkk/redsocks.git synced 2025-08-26 03:35:30 +00:00
Commit Graph

167 Commits

Author SHA1 Message Date
Leonid Evdokimov
9fce864ae0 Update README.html as well. 2011-11-14 04:07:01 +04:00
Leonid Evdokimov
27dd0243dc Added references to android tools: ProxyDroid and sshtunnel. 2011-11-14 03:52:48 +04:00
Leonid Evdokimov
2985413627 README: comment about UDP via OpenSSH & README.html 2011-10-14 00:12:44 +04:00
Leonid Evdokimov
57a1cab32d Some more comments regarding DNS via TCP. 2011-10-13 23:51:11 +04:00
Leonid Evdokimov
2f00cf44c5 Added dnstc service that serves any UDP DNS-like request with TC flag.
TC flag means `truncated`, so it actually means "ask me via TCP" for
compliant resolver.
2011-09-22 03:25:26 +04:00
Leonid Evdokimov
ec61ed130e Hey, redsocks has its own mailing list now :) 2011-08-10 19:32:13 +04:00
Leonid Evdokimov
d517e650ef redsocks now compiles with libevent-2.0 2011-08-01 13:28:38 +04:00
Leonid Evdokimov
79e22a67fa Change license to Apache 2.0 to ensure compatibility with android stack. 2011-04-20 20:17:09 +03:00
Leonid Evdokimov
2b6dcc83d6 Another s/strcpy/memcpy/ to fix another OpenBSD warning. 2011-02-11 01:43:47 +02:00
Leonid Evdokimov
e24b29abf8 Fix a bug in cnounce generation in http-connect.c & s/sprintf/snprintf/. 2011-02-11 01:36:07 +02:00
Leonid Evdokimov
d58db7f9a3 Replace strcpy with memcpy to eliminate warning (and improve speed a tiny bit). 2011-02-11 01:31:19 +02:00
Leonid Evdokimov
ebaeedead1 Improve nonce generation: srand() should be called only during startup. 2011-02-11 01:28:51 +02:00
Leonid Evdokimov
8b0a9dcc6c Make redsocks working with OpenBSD pf (at least sometimes). 2011-02-11 00:52:47 +02:00
Leonid Evdokimov
3224b3719d Fix typo: s/pw/pf/ 2011-02-10 22:50:51 +02:00
Leonid Evdokimov
67f5928d05 Fix one compiler warning occuring at OpenBSD. 2011-02-10 00:06:56 +02:00
Leonid Evdokimov
9bcb4dcc7e Fix compilation at OpenBSD 4.9. 2011-02-10 00:02:05 +02:00
Leonid Evdokimov
486431bb70 Update comment to be a bit less confusing. 2011-01-31 22:52:48 +02:00
Przemyslaw Pawelczyk
c97a9e0c77 Properly handle unsupported qops in digest_authentication_encode().
Auth-int is not supported yet, so the function should return early.
2011-01-28 02:06:17 +01:00
Przemyslaw Pawelczyk
cf3dc2c4f0 Hide warnings on unused variables if asserts are off.
redsocks.c: In function 'redsocks_read_expected':
redsocks.c:407: warning: unused variable 'read'

http-relay.c: In function 'httpr_client_read_cb':
http-relay.c:520: warning: unused variable 'written_wo_null'

These variables are used in asserts and if asserts are not compiled,
e.g. by defining NDEBUG (usually in CFLAGS via -DNDEBUG), then we have
misleading warnings.

Add in utils.h UNUSED() macro for creating null statement with result
casted to void. Use it to fix above warnings.
2011-01-27 23:22:09 +01:00
Przemyslaw Pawelczyk
ddbf2d28ab Use 'else if' in digest_authentication_encode().
In string comparison if-chain it's better to use 'else if', because it
clearly shows that conditions are exclusive.
2011-01-27 23:11:32 +01:00
Przemyslaw Pawelczyk
39b2639bdb Fix logic error bugs.
scan-build result for socks5.c:256:

    Function call argument is an uninitialized value

nextstate can be undefined reply's addrtype field has unexpected value.
Fix by adding else case before to report error, drop client and return
from socks5_read_reply() function.

scan-build result for main.c:144, parser.c:193:

    Result of operation is garbage or undefined

If there is early error in main() in second FOREACH block, then
terminators array is not itialized before access in shutdown path.
Fix by moving memset() to precede this block.

gettoken() does not initialize copytype enum value, so can have a
garbage value at some point. Add else case to the chain of **iter tests
to report error and return from the function.
2011-01-27 23:05:45 +01:00
Przemyslaw Pawelczyk
c82e944cba Fix dead store bugs.
scan-build result for redsocks.c:707, base.c:402, redudp.c:659:

    Dead assignment
2011-01-27 22:52:13 +01:00
Przemyslaw Pawelczyk
5a2fcb0518 Fix API bug and supposedly a typo.
scan-build result for http-auth.c:181:

    Argument with 'nonnull' attribute passed null

The bug it found is spurious, because requires impossible execution path
(visible to static analyzer due to omitted elses in code and tool's
stupidity), but it actually helped in finding real bug.
2011-01-27 22:47:33 +01:00
Przemyslaw Pawelczyk
88f9703603 Improve Makefile.
Many rules were applied to make Makefile better:
- Use all capitals for variable names. (readability)
- Introduce new variables, such as LIBS. (reusability)
- Use immediate values instead of deferred ones. (performance)
- Remove reimplemented implicit rules. (size)
- Prevent part of CFLAGS from being overwritten. (correctness)
- Create file w/ dependencies even if there is no gcc. (portability)
- Improve main output rule by respecting LDFLAGS. (correctness)
- Improve main output rule by respecting CFLAGS. (convenience)
- Remove error-prone -MP switch from gcc invocation listing dependencies.
- Use $^ instead of $+, as there is no need for duplication support yet.
- Use -include to prevent warnings if included file does not exist.
2011-01-27 22:39:34 +01:00
Przemyslaw Pawelczyk
91da237590 getsockopt wants optlen to be socklen_t.
Remove warning regarding optlen being size_t.

BTW:
- size_t is at least 16-bit unsigned integral type,
- socklen_t is at least 32-bit signed integral type.
It obviously doesn't matter here, because sizeof(int) fits in 4 bits.
2011-01-27 22:14:58 +01:00
Przemyslaw Pawelczyk
a94c198eb3 Fix conv specs in format strings for [s]size_t args.
Remove warnings in archs using LP64 by dealing with [s]size_t arguments.
There is a special length modifier 'z' that should precede integer
conversion specifier in format strings using [s]size_t arguments.
2011-01-27 22:06:40 +01:00
Daniel Gröber
191249a33c Fixed double "Basic" in Proxy-Authenticate header.
The authentication scheme name is already appended to the header in
httpc_mkconnect.
2011-01-24 15:17:05 +01:00
Leonid Evdokimov
642c9a448f Fix several compiler warnings. 2011-01-15 16:29:40 +02:00
Bin Jin
7099116ff1 remove free_null macro 2011-01-13 15:24:48 +08:00
Bin Jin
ba5b8bee01 handle malformed request properly 2010-12-09 13:30:08 +08:00
Bin Jin
9d876181b3 merge commits from upstream 2010-12-03 22:02:40 +08:00
Leonid Evdokimov
c0d4cede5a Initial UDP over Socks5 support. 2010-12-03 02:18:14 +02:00
Leonid Evdokimov
2e35ae49c7 Cleanup: make socks5 structures reusable. 2010-12-02 23:39:03 +02:00
Leonid Evdokimov
bce12d59dd Fix bug introduced in 45cab3. 2010-12-02 23:30:21 +02:00
Leonid Evdokimov
94c96a60ef Cleanup client session logging. 2010-12-02 23:16:23 +02:00
Bin Jin
7772258767 fix issue: recieve eof from client while connection to relay is not established 2010-11-29 22:41:53 +08:00
Leonid Evdokimov
197d37c382 Another minor cleanup. 2010-11-29 00:50:19 +02:00
Leonid Evdokimov
45cab3de31 This cleanup commit introduces ex-plain function! 2010-11-29 00:09:48 +02:00
Leonid Evdokimov
9c8f21a986 Further cleanup. 2010-11-28 23:15:56 +02:00
Bin Jin
04662c4226 fix several fatal issues; send request body on fly, rather than depend on content-length 2010-11-28 13:47:49 +08:00
Leonid Evdokimov
6e574a2021 Another source code cleanup. 2010-11-27 23:30:58 +02:00
Leonid Evdokimov
8ad8d7eb41 More source code cleanup. 2010-11-27 23:20:46 +02:00
Leonid Evdokimov
c50dd8b2b4 Some source code cleanup. 2010-11-27 21:57:43 +02:00
Bin Jin
f005959a55 update README file 2010-11-25 19:54:10 +08:00
Bin Jin
9136aa5e5f add clang compiler support; clean warnings; remove auth info from log file 2010-11-25 19:11:14 +08:00
Bin Jin
3d5d22a59b fix typo 2010-11-25 17:48:11 +08:00
Bin Jin
0ed9eeb920 add pidfile option 2010-11-24 14:44:02 +08:00
Bin Jin
651754834f fix memory leak issues 2010-11-23 14:19:57 +08:00
Bin Jin
a1e65e4ccb fix issue: EOF from client in http relay 2010-11-23 13:21:09 +08:00
Bin Jin
d95c791e8b fix: 403 found but not header provided 2010-11-23 02:04:18 +08:00