npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

trojan-manager

v1.0.7

Published

阿里云自动在抢占式服务器上面构建trojan应用.

Downloads

14

Readme

Trojan Manager

在阿里云上自动创建一个抢占式服务器, 安装trojan, 一键完成.

Why?

省 钱

算个账单, 按照每天花1G流量计算, 几乎每个月30元. 其中流量费用在18元左右, 如果不是经常看视频, 一个月可以压缩到一个月20元.

如下表:

| 地区 | 1核2G 服务器费用/h | 带宽费用/GB | 使用时间 (小时)| 一天费用(元) | 30天总费用 | :---: | :---: | :--: | :--: | :--:| :--:| | 曼谷 | 0.036| 0.590 | 12| 1.02|30.6 | | 日本| 0.038| 0.60 | 12|1.056| 31.68|

Usage

Usage: trojan-manager up -r <regionId>


Commands:
  trojan-manager up            Create trojan
  trojan-manager start         Start the servers
  trojan-manager stop          Stop the servers, save momey
  trojan-manager down          Destroy trojan
  trojan-manager setup-trojan  set up trojan for a ubuntu server
  trojan-manager bind-host     add domain record
  trojan-manager list          List all regions

Options:
  --version  Show version number                                       [boolean]
  --help     Show help                                                 [boolean]

准备工作

  1. 在阿里云上有账号, 并且充值超过100, 最好能有150块
  2. 在阿里云上创建一个用户
    1. 点击右上角的头像
    2. 点击访问控制
    3. 点击 用户 -> 创建用户
    4. 勾选 编程访问
    5. 添加3个权限 AliyunECSFullAccess, AliyunVPCFullAccess 和 AliyunDNSFullAccess
    6. 获取 AccessKeyID 和 AccessKeySecret
  3. 在万网注册一个便宜的域名, 8元/年
  4. 创建配置文件: touch ${HOME}/.trojan-manager.json
  5. 安装 npm install trojan-manager -g
  6. 查看地区 trojan-manager list
  7. 选择你要的地区然后创建 trojan-manager up -r ap-southeast-5
  8. 配置你的trojan客户端, 域名和密码在自己的配置文件中, 端口443
  9. done

配置文件

{
  // AccessKeyID (必填)
  "accessKeyId": "xxxxxxxxxx",
  // AccessKeySecret (必填)
  "accessKeySecret": "xxxxxxxxxx",
  // trojan的域名 (必填)
  "domain": "trojan.xxxxx.fun",
  // trojan的密码 (必填)
  "trojanPassword": "example123",
  // SSL 证书地址 (必填) 万网的域名可以生成免费的SSL, 下载nginx版本即可
  "sslCertPath": "/path/to/xxxx.pem",
  "sslKeyPath": "/path/to/xxxx.key",
  // 带宽大小
  "bandwidth": 100,               
  // 服务器的密码, 不填写系统会生成一个密码          
  "serverPassword": "Lcp8418326!",
}