1
0
Fork 0
mirror of git://git.psyced.org/git/psyced synced 2024-08-15 03:25:10 +00:00

you can torify psyced, but it probably wont work still

This commit is contained in:
The TorPSYC Team 2013-09-28 16:34:57 +02:00
parent 83231a2335
commit 8fc74212f6
4 changed files with 31 additions and 7 deletions

View file

@ -70,7 +70,8 @@ varargs int register_target(string uniform, vaobject handler, vaint shy) {
if (shy) return 2;
}
unless (handler) handler = previous_object();
P2(("register_target(%O) by %O\n", uniform, handler))
P2(("register_target(%O, %O) by %O\n", uniform, handler,
previous_object()))
targets[uniform] = handler;
#if 0 // this shouldn't be necessary TODO
uniform = lower_case(uniform);

View file

@ -319,6 +319,12 @@ int psyc_sendmsg(mixed target, string mc, mixed data, mapping vars,
string psychopo;
string psycippo = "psyc://"+ $1 +"/";
#if 0
if (trail(".onion", hopo)) {
psycippo = hopo; // not a solution
raise_error("Unable to handle .onion correctly, snif.\n");
}
#endif
// if ($3 && $3 != PSYC_SERVICE) {
if ($9) {
hopo += ":"+$9;

View file

@ -1,6 +1,13 @@
// vim:syntax=lpc:ts=8
/* implementation of the socks5 protocl
/* implementation of the socks5 protocol
* http://tools.ietf.org/html/rfc1928
*
* accepts SOCKS connections on a port and creates outgoing connection
* if requested to do so. when it enter STATE_READY it stops working.
* there is no interaction with the rest of the psyced code, so it's
* a bit odd to use psyced as a socks proxy. makes more sense if psyclpc
* was capable of connecting to hosts via SOCKS.
*/
#include <net.h>
#include <input_to.h>
@ -196,13 +203,14 @@ void read_callback(string data) {
return;
} else {
buffer += data;
// switch this!
if (state == STATE_INITIAL) {
parseNegotiation();
}
if (state == STATE_AUTH_USERPASS) {
else if (state == STATE_AUTH_USERPASS) {
parseUserPass();
}
if (state == STATE_REQUEST) {
else if (state == STATE_REQUEST) {
parseRequest();
}
}