mirror of
https://github.com/ChronosX88/psyced.git
synced 2024-11-13 22:11:02 +00:00
you can torify psyced, but it probably wont work still
This commit is contained in:
parent
83231a2335
commit
8fc74212f6
15
bin/psyconf
15
bin/psyconf
@ -349,6 +349,7 @@ X
|
|||||||
|
|
||||||
my $db = $c{_optional_level_debug} || '0';
|
my $db = $c{_optional_level_debug} || '0';
|
||||||
my $psyced = "$execs/$driver -DDEBUG=$db";
|
my $psyced = "$execs/$driver -DDEBUG=$db";
|
||||||
|
my $torify = "";
|
||||||
my $debugfile;
|
my $debugfile;
|
||||||
|
|
||||||
if ( $c{_optional_use_file_debug} ) {
|
if ( $c{_optional_use_file_debug} ) {
|
||||||
@ -370,6 +371,13 @@ X
|
|||||||
my $fqdn = "$c{_basic_host_name}.$c{_basic_host_domain}";
|
my $fqdn = "$c{_basic_host_name}.$c{_basic_host_domain}";
|
||||||
$psyced .= " --hostname $fqdn";
|
$psyced .= " --hostname $fqdn";
|
||||||
$hc = 0; # no problem
|
$hc = 0; # no problem
|
||||||
|
say "Your hostname will be assigned as $fqdn.\n";
|
||||||
|
if ($c{_basic_host_domain} eq 'onion') {
|
||||||
|
$torify = "torsocks";
|
||||||
|
say "Enabling PSYC federation over Tor: Using "
|
||||||
|
. "torsocks wrapper around psyced.\n";
|
||||||
|
say "Warning: It will probably not function.\n"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
## ldmud bug number two
|
## ldmud bug number two
|
||||||
#WARNING: Because of some funny bug the driver will probably not bind properly
|
#WARNING: Because of some funny bug the driver will probably not bind properly
|
||||||
@ -509,7 +517,7 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# if your ldmud is too old, it may not understand --pidfile and --tls-*
|
# if your ldmud is too old, it may not understand --pidfile and --tls-*
|
||||||
commandline="$psyced -s 0 -s v0 --swap-file $base/psyced.swap --erq $execs/erq --pidfile $sandbox/data/$driver.pid -m $sandbox -u $portUDP $ports"
|
commandline="$torify $psyced -s 0 -s v0 --swap-file $base/psyced.swap --erq $execs/erq --pidfile $sandbox/data/$driver.pid -m $sandbox -u $portUDP $ports"
|
||||||
|
|
||||||
# keep the pid of this wrapper process, too
|
# keep the pid of this wrapper process, too
|
||||||
echo \$\$ >data/psyced.pid
|
echo \$\$ >data/psyced.pid
|
||||||
@ -669,7 +677,7 @@ X
|
|||||||
$t = "$base/var/tor";
|
$t = "$base/var/tor";
|
||||||
mkdir($t);
|
mkdir($t);
|
||||||
$t = "$base/etc/tor/torrc";
|
$t = "$base/etc/tor/torrc";
|
||||||
say "Generating control file $t ..\n";
|
say "Generating Tor configuration $t ..\n";
|
||||||
rename $t, "$t~";
|
rename $t, "$t~";
|
||||||
open O, '>', $t or die "Cannot write to $t";
|
open O, '>', $t or die "Cannot write to $t";
|
||||||
|
|
||||||
@ -803,7 +811,8 @@ X
|
|||||||
}
|
}
|
||||||
# close IG;
|
# close IG;
|
||||||
|
|
||||||
print "\nModel creation completed successfully.\n";
|
#print "\nModel creation completed successfully.\n";
|
||||||
|
print "\n";
|
||||||
|
|
||||||
## end of former archetype.pl
|
## end of former archetype.pl
|
||||||
|
|
||||||
|
@ -70,7 +70,8 @@ varargs int register_target(string uniform, vaobject handler, vaint shy) {
|
|||||||
if (shy) return 2;
|
if (shy) return 2;
|
||||||
}
|
}
|
||||||
unless (handler) handler = previous_object();
|
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;
|
targets[uniform] = handler;
|
||||||
#if 0 // this shouldn't be necessary TODO
|
#if 0 // this shouldn't be necessary TODO
|
||||||
uniform = lower_case(uniform);
|
uniform = lower_case(uniform);
|
||||||
|
@ -319,6 +319,12 @@ int psyc_sendmsg(mixed target, string mc, mixed data, mapping vars,
|
|||||||
string psychopo;
|
string psychopo;
|
||||||
string psycippo = "psyc://"+ $1 +"/";
|
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 ($3 && $3 != PSYC_SERVICE) {
|
||||||
if ($9) {
|
if ($9) {
|
||||||
hopo += ":"+$9;
|
hopo += ":"+$9;
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
// vim:syntax=lpc:ts=8
|
// vim:syntax=lpc:ts=8
|
||||||
/* implementation of the socks5 protocl
|
|
||||||
|
/* implementation of the socks5 protocol
|
||||||
* http://tools.ietf.org/html/rfc1928
|
* 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 <net.h>
|
||||||
#include <input_to.h>
|
#include <input_to.h>
|
||||||
@ -196,13 +203,14 @@ void read_callback(string data) {
|
|||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
buffer += data;
|
buffer += data;
|
||||||
|
// switch this!
|
||||||
if (state == STATE_INITIAL) {
|
if (state == STATE_INITIAL) {
|
||||||
parseNegotiation();
|
parseNegotiation();
|
||||||
}
|
}
|
||||||
if (state == STATE_AUTH_USERPASS) {
|
else if (state == STATE_AUTH_USERPASS) {
|
||||||
parseUserPass();
|
parseUserPass();
|
||||||
}
|
}
|
||||||
if (state == STATE_REQUEST) {
|
else if (state == STATE_REQUEST) {
|
||||||
parseRequest();
|
parseRequest();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user