Commit Graph

18 Commits

Author SHA1 Message Date
Joel Martin 3205a3dee8 Add --key option for separate cert and key file.
If only --cert is specified then continue to assume both certificate
and key are in the same file (key first).
2010-11-06 10:55:09 -05:00
Joel Martin e70f1d947e Remove left over record code. Squelch compile warnings 2010-11-06 10:53:32 -05:00
François Revol f61274c827 wsproxy: Mac OS X build fixes
- pass CFLAGS and LDFLAGS in case one needs to use -m32
- link to libcrypto for _ERR_print_errors_fp
- __THROW is non-standard define it to nothing by default
- use b64_ntop and b64_pton instead of mangled versions, OSX doesn't mangle them in the same way
- access() takes two arguments!

Signed-off-by: François Revol <revol@free.fr>
2010-11-06 10:04:24 -05:00
Joel Martin cc374cd61a proxy: always multiprocess and add --verbose.
Always fork handlers processes. Instead printing traffic when
single-processing, print traffic if verbose flag given.
2010-09-11 15:10:54 -05:00
Joel Martin a0315ab1dc wsproxy: multiprocess capable.
Add -m, --multiprocess option which forks a handler for each
connection allowing multiple connections to the same target using the
same proxy instance.

Cleaned up the output of the handler process. Each process' output is
prefixed with an ordinal value.

Changed both the C and python versions of the proxy.
2010-09-10 13:05:48 -05:00
Joel Martin 465faf19db Remove record option from C wsproxy.
I've decided that debug/develop/extra features will just be in the
python version of the proxy. The C version (and other versions) will
just have the core functionality (unless someone wants to support it).
2010-09-10 09:58:26 -05:00
Joel Martin 801482be6a WebSockets orderly/clean close frame.
- When a packet with only '\xff\x00' is received, this means the
  client is doing an orderly shutdown. (WebSockets spec version 76)
2010-08-03 13:23:59 -05:00
Joel Martin 1656b1b98d Fix listen_port check.
Interestingly, the bug depends on compiler behavior. If local
variables are automatically initialized to 0, then this always caused
the program to error out indicating a failure to parse the listen
port. Otherwise, the test was a no-op (except the rare case where the
memory happened to be zero anyways).

Thanks to Eugen Melnikoff for finding this.
2010-07-17 12:13:54 -05:00
Joel Martin 31407abc25 Issue #11: daemonize after opening listen port.
The listen port should be opened before daemonizing otherwise if
opening the port fails, the user will get no feedback. The only
complication was that the listen socket needs to not be closed as part
of daemonizing.

Thanks to http://github.com/rickr for finding it.
2010-07-17 12:05:58 -05:00
Joel Martin 146071161f Update usage and README.md. 2010-06-17 17:50:15 -05:00
Joel Martin 5c34ce4beb More arg processing fixes. 2010-06-17 17:24:54 -05:00
Joel Martin ee26cbf24d Argument processing fixes. Misc proxy fixes. 2010-06-17 17:05:33 -05:00
Joel Martin 6ee61a4cf6 Add daemonization support to wsproxy.*.
Refactor how settings are passed around.
2010-06-17 16:06:18 -05:00
Joel Martin 459b2578b2 Force SSL option to proxies. Use getopt_long. 2010-06-16 13:58:00 -05:00
Joel Martin b0696c4473 Better C proxy host resolution.
Use getaddrinfo instead of gethostbyname.
2010-06-16 13:11:07 -05:00
Joel Martin f2898eabd3 Add listen address to proxy (C and python).
This allows forwarding from an external port to the same port on
localhost (loopback). I.e.

./utils/wsproxy `hostname -f`:5901 localhost:5901
2010-06-16 12:37:03 -05:00
Joel Martin 9a09b636e7 Add UTF-8 wire encoding support to C wsproxy. 2010-06-07 13:47:44 -05:00
Joel Martin 7210e79e04 Move wsproxy and web utils into utils/ subdir. 2010-06-07 12:49:57 -05:00
Renamed from wsproxy.c (Browse further)