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 is accelerated through Alibaba Cloud DCDN or Tencent Cloud ECDN as intermediate sources for acceleration with self-built CDN to differentiate routing operations, resulting in very 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 are accelerated using Alibaba Cloud DCDN or Tencent Cloud ECDN as intermediate sources with self-built CDN. The AI generation projects are generated using Replicate and limited to a certain number of generations per person per day using Upstash. 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 with the database using Neon. Since Vercel has basic PHP hosting capabilities, I also host some lightweight PHP applications on it, such as Meting-api, BiliVideo parsing, and the comment system for this blog.

Railway#

Deployed Subscriptions, Umami database, live barrage server, etc., using Alibaba Cloud DCDN or Tencent Cloud ECDN as intermediate sources for acceleration with self-built CDN. 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 the operation of RSSHub is mediocre.

Tencent Cloud SLS#

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

Replit#

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

CloudFlare Workers#

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

CDN Acceleration#

moeyy.cn uses self-built CDN for acceleration, adopts the Hexo framework, updates the code to GitHub, automatically builds, and then deploys to Alibaba Cloud OSS. The CDN servers use Alibaba Cloud ECS/Azure/AWS/Vultr/Digitalocean, etc. Most of the services of this site are deployed overseas, but the speed in China is also very fast, thanks to the intermediate sources 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. It uses OSS mirroring for permanent storage and uses OSS global acceleration for cross-border acceleration. Edge scripts are used for ref detection and other operations:

# Single IP rate limit of 10m/s
limit_rate(10, 'm')

# Block overseas access, because 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 verification, and allow ref to be empty. /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, and more services can be viewed at 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.