search
HomeComputer TutorialsComputer KnowledgeHow to deploy Trojan agent on cloud server?

How to deploy Trojan agent on cloud server?

To deploy Trojan agent on cloud server, you can follow the steps below:

  1. First, make sure you have an available cloud server and that you are able to connect to it via SSH.
  2. 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 地址。

  1. 在服务器上安装 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
  2. 配置 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 字段中设置你要使用的密码。

  1. 生成 SSL 证书。运行以下命令:
sudo trojan cert -s your_server_domain_name

请将 
your_server_domain_name 替换为你服务器的域名。这将生成一个自签名的 SSL 证书,并将其保存到 
/etc/trojan/server.crt 和 
/etc/trojan/server.key

  1. 启动 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!

Statement
This article is reproduced at:每日运维. If there is any infringement, please contact admin@php.cn delete
Use Chrome Web Store to Find & Install Extensions for Chrome - MiniToolUse Chrome Web Store to Find & Install Extensions for Chrome - MiniToolMay 06, 2025 am 12:50 AM

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.

Fix: Microsoft Word Opens Files in Read-Only Mode - MiniToolFix: Microsoft Word Opens Files in Read-Only Mode - MiniToolMay 06, 2025 am 12:48 AM

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”.

How to Download, Install, Update RTX 3060 Drivers for Win 11/10 - MiniToolHow to Download, Install, Update RTX 3060 Drivers for Win 11/10 - MiniToolMay 06, 2025 am 12:47 AM

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[Answers Got] Google Sites Sign in – What Is Google Sites? - MiniToolMay 06, 2025 am 12:46 AM

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

How to Update Your PS5 DualSense Controller on PC? - MiniToolHow to Update Your PS5 DualSense Controller on PC? - MiniToolMay 06, 2025 am 12:45 AM

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.

Easy Ways to Ping a Phone to Find Its Location – Is It Legal? - MiniToolEasy Ways to Ping a Phone to Find Its Location – Is It Legal? - MiniToolMay 06, 2025 am 12:44 AM

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

Guide - Windows 11 Enterprise N: ISO Download/Install, WatchGuide - Windows 11 Enterprise N: ISO Download/Install, WatchMay 06, 2025 am 12:43 AM

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

Tiny11Builder Creates Your Own Tiny11 – Windows 11 Lite ISO - MiniToolTiny11Builder Creates Your Own Tiny11 – Windows 11 Lite ISO - MiniToolMay 06, 2025 am 12:42 AM

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

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function