banner
moeyy

moeyy

一条有远大理想的咸鱼。
github
mastodon
email

This site has been fully hosted on the PaaS platform.

Preface#

Running things on your own server may cause your website to go offline due to server expiration, attacks, or accidentally messing up the environment. I pursue the fastest speed and stability, and using a PaaS platform can meet my needs.

PaaS platforms used by this site#

Web#

Database#

Services#

Fly.io#

Alist, Valorant Store Viewer, and WebSSH are deployed on fly.io. The Alist deployment tutorial is in this article, and the traffic passes through Alibaba Cloud DCDN or Tencent Cloud ECDN for acceleration as an intermediate source, with low latency worldwide. Some miscellaneous Docker services are also deployed on it.

Vercel and Netlify#

There are quite a few projects deployed on Vercel, such as AI-generated anime images, AI age inference, AI photo restoration, Modifying images with AI through text, Drawing with AI scribble diffusion, OpenGPT application, AI legal assistant, AgentGPT, Arknights Toolbox, Render Reader, Public image hosting upload API, Umami website statistics, Weather query, Pixiv Now, Guestbook, and AI introduction generation for blog articles.

All of the above applications use Alibaba Cloud DCDN or Tencent Cloud ECDN for acceleration as an intermediate source, and AI generation projects are connected to Replicate for generation, with Upstash used to limit the number of daily generations per person. OpenGPT uses the Planetscale database, and the AI legal assistant uses Supabase to store legal data. The upload interface for the public image hosting is on GitHub. The guestbook is a lightweight PHP application, and the database uses Neon. Because Vercel has basic PHP hosting capabilities, I also host some lightweight PHP applications on it, such as Meting-api and BiliVideo parsing, as well as the comment system for this blog.

Railway#

Deployed Subscriptions, Umami database, live broadcast barrage server, etc., using Alibaba Cloud DCDN or Tencent Cloud ECDN for acceleration as an intermediate source, with low latency worldwide. Because Railway and Fly.io do not sleep, I will deploy some small programs to run on them. However, it only has the United States region, while fly.io is global.

Koyeb#

Public RSSHub service, using CloudFlare and Baidu Cloud CDN. The free tier only has 1H512M, so running RSSHub is just passable.

Tencent Cloud SLS#

Deployed Music API service, using Alibaba Cloud DCDN for global acceleration. Some proxy programs are deployed in Tencent Cloud Functions, such as Thai and Hong Kong proxies used to unlock Bilibili anime.

Replit#

Deployed WebProxy and Mikuinvidious, using Gcore and Baidu Cloud CDN/BunnyCDN to differentiate between domestic and overseas for acceleration.

CloudFlare Workers#

Deployed projects such as URL shortener, GitHub download acceleration, and ChatGPT.

CDN Acceleration#

moeyy.cn uses self-built CDN for acceleration, using the Hexo framework. After the code is updated to GitHub, it is automatically built and deployed to Alibaba Cloud OSS. The CDN servers used include Alibaba Cloud ECS/Azure/AWS/Vultr/Digitalocean, etc. Most of the services on this site are deployed overseas, but the speed in China is also very fast, thanks to the intermediate source being Alibaba Cloud DCDN or Tencent Cloud ECDN.

cdn.moeyy.cn uses Alibaba Cloud CDN in China and CloudFlare overseas. It supports acceleration for jsdelivr, mapbox, unpkg, baomitu, gravatar, staticfile, google ajax, gthemes, cdnjs, google fonts, alifonts, html2canvas, and my private image hosting, using OSS mirroring for permanent storage and using OSS global acceleration for cross-border acceleration. Edge scripts are used for ref detection and other operations:

# Rate limit of 10m/s per IP
limit_rate(10, 'm')

# Block overseas access. Since Cloudflare is used overseas, Alibaba Cloud CDN blocks overseas access to prevent malicious hosts from hitting Alibaba Cloud overseas nodes to generate traffic.
if not(match_re(client_region(), '370000|450000|310000|230000|540000|440000|120000|150000|340000|330000|530000|630000|320000|620000|420000|410000|360000|210000|640000|110000|460000|130000|510000|500000|610000|220000|140000|650000|350000|430000|520000')) {
    add_rsp_header('X-REGION-BLOCK', concat('hit region_region:', client_region()))
    exit(418)
}

# Exclude /no_referer path for ref authentication and allow empty ref. /no_referer is not subject to ref source detection.
if not(match_re($uri, '^/no_referer')) {
    moeyy_ref = req_header('Referer','re:^(https?:\/\/)?([\w-]+\.)?(moeyy\.cn|moeyy\.xyz)') # Regular expression matching ref containing moeyy.cn and moeyy.xyz
    null_ref = req_header('Referer','re:(.)') # Regular expression matching ref containing ".", used to check if ref is empty
    if null_ref {
        if not(moeyy_ref) {
            exit(403)
        } 
    }
}

The above is only a part of the services. For more services, you can check moeyy.cn/app.

If you want tutorials for certain services, you can leave a comment, and I will write them when I have time.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.