0

I asked this question a few years back but it seems like it is not useful for all softwares. I am in the same scenario but with different software.

Is it possible to install Clash on the Server without root access?

Server details are given below. I have only access to command line via Putty

Distributor ID: Ubuntu
Description:    Ubuntu 18.04.5 LTS
Release:        18.04
Codename:       bionic
Adnan Ali
  • 141
  • 1
  • 5

2 Answers2

0

Edit/Disclaimer
You seems to be a beginner on linux. you should never execute code you find if you do not understand it. My example hasn't been tested and is only a vague guidance because it is a very simple problem you should be able to correct instruction on you own.

It's a GoLang program, you should either compile it on another machine or use the release available. Download the version you need (most likely the amd64).
Once downloaded extract it and use your program as much as you want.

If you're not root you cannot put it in /bin/ or in /usr/bin but you could put it in your home ~/.bin and add it to your $PATH:

cd ~
mkdir .bin
cd .bin
wget -O- https://github.com/Dreamacro/clash/releases/download/v1.7.1/clash-darwin-amd64-v1.7.1.gz | tar xzf -
mv clash-darwin-amd64 clash
chmod +x clash
#Edit your .bashrc to update your $PATH with:  
#PATH=~/.bin:${PATH}

If your not root you will not be ale to use network port below 1024 those are reserved for system application.

Kiwy
  • 9,534
0

Seems unlikely. Well, you can probably install it under your home directory (or anywhere you have write access), but since some of what it does requires root it won't be very useful and will probably exit as soon as you run it.

It seems to run a local http/https/socks server. Socks on port 1080 is OK, but the port numbers for http (port 80) and https (443) are below 1024 and therefore require root.

It also seems to do stuff with netfilter/iptables - which will also require root.

There's probably more, but I stopped investigating after that.

cas
  • 78,579
  • seems like no hope. so i have to suffer 2 more years, actually, I am in China and I needed VPN, ok thanks anyway – Adnan Ali Sep 24 '21 at 13:00