diff --git a/Scripts/update_server.pl b/Scripts/update_server.pl --- a/Scripts/update_server.pl +++ b/Scripts/update_server.pl @@ -1,12 +1,12 @@ #!/usr/bin/env perl -=About +==About This is a perlized "Update Server" script which should run out of the box on most machines. If not you need to install HTTP::Tiny sudo cpan >install HTTP::Tiny by virii -=cut +==cut use HTTP::Tiny; use IO::Socket; ######## [defaults] ######## @@ -36,12 +36,16 @@ for (1..scalar @configs) { $data_dir = $1 if /^DataDirectory (.*)/i; $pidfile = $1 if /^PidFile (.*)/i; $obfs = 'True' if /^ServerTransportPlugin (obfs\d+|scramblesuit)/i; + $fteproxy = 'True' if /^ServerTransportPlugin fte/i; $ip = $1 if /^OutboundBindAddress (\d+\.\d+\.\d+\.\d+)/i; } close config; ######## [obfs check] ######## $obfs = 'False' if $obfs ne 'True' and $server_type eq 'Bridge'; print $obfs . "\n"; +######## [fte check] ######## +$fteproxy = 'False' if $fteproxy ne 'True' and $server_type eq 'Bridge'; +print $fteproxy . "\n"; ######## [ip check] ######## if ($ip == "") { $socket = new IO::Socket::INET ( PeerAddr => "enn.lu", @@ -72,6 +76,7 @@ if ($server_type eq "Bridge") { '", "server_name": "' . $server_name . '", "server_type": "' . $server_type . '", "obfs": "' . $obfs . + '", "fteproxy": "' . $fteproxy . '", "tor_status": "' . $tor_status . '"}'; } else {