diff --git a/lainsafecli b/lainsafecli
index f5b6ae0c820551da44a3ff85780f1a0b459a38b6..aeb1610425394d6c363afa60fda17798498b30a5 100755
--- a/lainsafecli
+++ b/lainsafecli
@@ -15,27 +15,30 @@
 
 # You should have received a copy of the GNU General Public License
 # along with lainsafe.  If not, see <https://www.gnu.org/licenses/>.
-    
+
 
 
 use Getopt::Long;
 use LWP::UserAgent;
-
+my $ua = LWP::UserAgent->new;
 use strict;
 use warnings;
 # variables
 my $help;
+my $tor;
 my $DEFAULT_SERVER;
 my $file;
 my $DISPLAY_ASCII;
 my $STORE_LINKS;
 my $LINKS_FILE;
+my $tor_enabled = 1;
 # Default options, if no specified.
 $DEFAULT_SERVER = "https://lainsafe.delegao.moe";
 $DISPLAY_ASCII = 1; # 0 if you don't want the ascii
-$STORE_LINKS = 1; # 0 if you don't want to keep track of your upload
+$STORE_LINKS = 1;   # 0 if you don't want to keep track of your upload
 $LINKS_FILE = "$ENV{HOME}/.cache/lainsafelinks";
 
+eval "use LWP::Protocol::socks; 1" or $tor_enabled = 0;
 my $ASCII_ART = <<'EOF';
            _..-- ----- --.._
         ,-''                `-.
@@ -57,27 +60,36 @@ my $ASCII_ART = <<'EOF';
        v,-    `;._   _.;     | |
           `'`\ |-_      -^'^'| |
                   ------     |/
-          
+
 EOF
 
 # Subs
 
 sub help
-{
+  {
     print "lainsafecli, a command line interface for lainsafe.\n";
-    print "USAGE: lainsafecli [--server] FILE\n\n";
+    print "USAGE: lainsafecli [--tor] [--server] FILE\n\n";
     print "if --server not given, $DEFAULT_SERVER is used.\n";
-
+    print "--tor is available\n" if $tor_enabled;
+    print "--tor is unavailable\n" unless $tor_enabled;
     exit;
-}
+  }
+
+sub enable_tor
+  {
+    die "Tor is unavaiable, install LWP::Protocols::socks\n" unless $tor_enabled;
+    my $checker = $ua->proxy([qw(http https)] => 'socks://localhost:9050');
+  }
 
 ## PROGRAM
-my $ua = LWP::UserAgent->new;
+
 GetOptions ("server=s" => \$DEFAULT_SERVER,
-            "help|" => \$help);
+            "help|" => \$help,
+            "tor"=> \$tor
+           );
 
 &help if $help || not defined $ARGV[0];
-
+&enable_tor if $tor;
 
 # check if file is given
 
@@ -93,32 +105,30 @@ $ua->agent("Mozilla/5.0 (X11; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0
 
 # check if server is running lainsafe
 
-if(!$ua->get($url_to_upload)->is_success)
-{
-    print "$url_to_upload is not running lainsafe.\n";
-    exit;
+if (!$ua->get($url_to_upload)->is_success) {
+  print "$url_to_upload is not running lainsafe.\n";
+  exit;
 }
 
 
 $req = $ua->post($url_to_upload,
-  Content_Type => 'form-data',
-  Content => [
-     "file" => [ $file ],
-  ],
-);
+                 Content_Type => 'form-data',
+                 Content => [
+                             "file" => [ $file ],
+                            ],
+                );
 
 
 print $ASCII_ART if $DISPLAY_ASCII;
-if($req->{_content} =~ /instance/) # If someone knows how to do it another way, I'm all ears
-{
-  print $req->{_content} . "\n";
-  exit;	
-}
-print $DEFAULT_SERVER . "/" . $req->{_content} . "\n";
-
-if($STORE_LINKS)
+if ($req->{_content} =~ /instance/) # If someone knows how to do it another way, I'm all ears
   {
-    open FILE,'>>',$LINKS_FILE or die $!;
-    print FILE $DEFAULT_SERVER . "/" . $req->{_content} . " $file"  ."\n";
-    close FILE;
+    print $req->{_content} . "\n";
+    exit;
   }
+print $DEFAULT_SERVER . "/" . $req->{_content} . "\n";
+
+if ($STORE_LINKS) {
+  open FILE,'>>',$LINKS_FILE or die $!;
+  print FILE $DEFAULT_SERVER . "/" . $req->{_content} . " $file"  ."\n";
+  close FILE;
+}