To deploy Trojan agent on cloud server, you can follow the steps below:
- First, make sure you have an available cloud server and that you are able to connect to it via SSH.
- Use SSH to log in to your cloud server. You can use a command line tool similar to:
ssh username@server_ip_address
其中,username
是你的服务器用户名,server_ip_address
是你的服务器的 IP 地址。
-
在服务器上安装 Trojan 代理。可以按照以下步骤进行操作:
a. 添加 Trojan 的软件包仓库。运行以下命令:
sudo add-apt-repository -y ppa:deadsnakes/ppa sudo apt-get update
b. 安装 Trojan 依赖的软件包。运行以下命令:
sudo apt-get install -y python3 python3-pip python3-setuptools python3-wheel
c. 安装 Trojan。运行以下命令:
sudo pip3 install --upgrade trojan
- 配置 Trojan 代理。创建一个 Trojan 服务器配置文件,例如
config.json
。可以使用任何文本编辑器打开文件,并将以下示例配置添加到文件中:
{ "run_type": "server", "local_addr": "0.0.0.0", "local_port": 1080, "remote_addr": "your_server_ip_address", "remote_port": 443, "password": [ "your_password" ], "log_level": 1, "ssl": { "cert": "/etc/trojan/server.crt", "key": "/etc/trojan/server.key", "key_password": "", "cipher": "AES-256-GCM" } }
请将 your_server_ip_address
替换为你服务器的 IP 地址,并在 password
字段中设置你要使用的密码。
- 生成 SSL 证书。运行以下命令:
sudo trojan cert -s your_server_domain_name
请将 your_server_domain_name
替换为你服务器的域名。这将生成一个自签名的 SSL 证书,并将其保存到 /etc/trojan/server.crt
和 /etc/trojan/server.key
。
- 启动 Trojan 代理。运行以下命令:
sudo trojan -c /path/to/config.json
请将 /path/to/config.json
替换为你之前创建的配置文件的路径。
现在,你已经成功在云服务器上部署了 Trojan 代理。你可以在本地设备上配置 Trojan 客户端,并使用服务器 IP 地址、密码和端口 443 进行连接。
The above is the detailed content of How to deploy Trojan agent on cloud server?. For more information, please follow other related articles on the PHP Chinese website!

Learn about Chrome Web Store and use it to easily find and add useful extensions to your Google Chrome browser. Detailed instructions for how to install and manage Chrome Web Store extensions are provided.

Sometimes Microsoft Word opens files in read-only mode, which prevents you from editing the documents. This article from php.cn mainly introduces several ways to solve the problem “Microsoft Word opens files in read-only mode”.

RTX 3060 drivers download, installation, and update are simple tasks. If you have a new graphics card - NVIDIA GeForce RTX 3060 Ti, updating or installing the proper graphics card driver for it is important. Let’s read this post and php.cn will show
![[Answers Got] Google Sites Sign in – What Is Google Sites? - MiniTool](https://img.php.cn/upload/article/001/242/473/174646357029132.png?x-oss-process=image/resize,p_40)
What is Google Sites? Google has developed a variety of products covering different fields. Just like Gmail, Calendar, Drive, Docs, Sheets, and Slides, Google Sites is one of them but not that kind of commonly used in daily life. But Google Sites is

Sony has released a new app Firmware updater for DualSense wireless controller to help its users to update the PS5 DualSense controller on PC. In this post, php.cn will show you how to update the PS5 DualSense controller on a PC using this new app.

When you lost your mobile phone, you want to find its location and ping a phone in some way; or if your children have a long time to leave home, you need to locate them and ping their phone. But what’s the bottom line of pinging a phone? And how to p

Windows is Windows 11 Enterprise N? What is the difference between Windows 11 Enterprise and Enterprise N? How to download Windows 11 Enterprise N ISO and install it on your PC? In this post from php.cn, you can find answers to these questions, and l

What should you do if you want to create your own Tiny11 – a Windows 11 lightweight version? Tiny11Builder can help you to build a light version of Windows 11 with the official Windows 11 ISO file. See this post from php.cn and you can find much info


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

WebStorm Mac version
Useful JavaScript development tools

Dreamweaver CS6
Visual web development tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

SublimeText3 Mac version
God-level code editing software (SublimeText3)

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function
