Total Pageviews

Saturday, 18 July 2026

利用 GitHub Codespaces容器环境,手动挡搭建一个高速 VLESS 连接点

 

这种方法抛弃了冗余的一键脚本,不仅响应速度更快,而且配置极其透明、安全。

为什么选择 GitHub Codespaces?

GitHub Codespaces 是微软提供的云端开发环境。它不仅拥有极高的带宽(通常是千兆对等),而且稳定性极佳。相比于传统的 VPS 搭建,这种方法不需要你购买域名或服务器,只需一个 GitHub 账号即可起飞。


核心搭建流程

GITHUB官网:【点击前往】


第一步:创建一个新的仓库 (Repository)

Codespaces 必须依托于一个仓库才能运行。
  1. 在 GitHub 首页(右上角),点击加号 + 图标,选择 New repository。

  2. Repository name: 随便起个名字,比如 my-cloud-vps。

  3. Public/Private: 建议选 Private(私有),这样别人看不到你的服务器配置。

  4. 勾选 Add a README file(这能确保仓库不是空的,方便直接创建空间)。

  5. 点击底部的绿色按钮 Create repository。


第二步:启动 Codespace 环境

仓库创建好后,你会进入仓库主页。

  1. 找到绿色的 <> Code 按钮并点击。

  2. 在弹出的菜单中,选择 Codespaces 选项卡。

  3. 点击底部的 Create codespace on main。

  4. 提示:GitHub 会开始初始化环境,这可能需要 30 秒到 1 分钟。完成后,你会看到一个和 VS Code 一模一样的网页版编辑器。


第三步:进入终端操作

  1. 环境启动后,你会看到屏幕下方有一个 Terminal(终端) 窗口(如果没有看到,按快捷键 Ctrl + ` 即可呼出)。

  2. 接下来你就可以执行之前提到的安装命令了:

  3. 输入:

    sudo su 

    获取 root 权限。

    按照我之前给你的步骤安装 PufferPanel 或其他脚本。

    第四步:环境初始化(下载发动机)

    首先,我们需要在 Codespaces 的终端中下载官方的编译程序。这一步相当于把“发动机”搬进我们的服务器。

     1. 下载 sing-box 官方程序包
    wget https://github.com/SagerNet/sing-box/releases/download/v1.10.1/sing-box-1.10.1-linux-amd64.tar.gz


    2. 解压安装包
    tar -zxvf sing-box-1.10.1-linux-amd64.tar.gz

    3. 进入程序目录
    cd sing-box-1.10.1-linux-amd64

    第五步:精准配置(对准连接暗号)

    为了确保连接的唯一性和安全性,我们需要手动写入配置文件。这里我们直接锁定 UUID 和 传输路径,避免了脚本随机生成导致的不确定性。

    把这里的UUID修改成自己的。

    cat <<EOF > ./config.json
    {
    "log": { "level": "info" },
    "inbounds": [{
    "type": "vless",
    "tag": "vless-in",
    "listen": "::",
    "listen_port": 8080,
    "users": [{ "uuid": "4ee06e75-4605-4cbd-896a-c88e7751cbbb" }],
    "transport": { "type": "ws", "path": "/vless" }
    }],
    "outbounds": [{ "type": "direct", "tag": "direct" }]
    }
    EOF
     

    第六步:正式点火启动

    运行以下命令,让服务在后台跑起来:

    ./sing-box run -c ./config.json

    第七步:打通最后一公里(关键权限设置)

    这是最重要的一步!GitHub 默认端口是私有的,我们需要手动公开:

    点击底部的 Ports 标签页。找到 8080 端口对应的 Local Address(或者右键点击端口选择 Copy Local Address),这才是填入客户端的“地址”。在 Visibility 那一列,右键点击并将 Private 改为 Public。

     

    配置参数对照表(以 v2rayN 为例):

    地址 (Address): 填你的 GitHub 预览域名 (不带 https://)

     端口 (Port): 443 (核心重点!)

     用户 ID (UUID): 4ee06e75-4605-4cbd-896a-c88e7751cbbb(你自己的UUID)

     传输协议 (Network): ws

     伪装类型 (Header type): none

     路径 (Path): /vless

     底层传输安全 (TLS): tls

    SNI: 填你的 GitHub 预览域名

     

    快速复活小技巧:

    如果发现连接点失效,登录 GitHub 进入项目,点击底部的 Terminal,按键盘“向上箭头”找回命令 ./sing-box run -c ./config.json 回车即可,无需重新配置。

     核心避坑指南(干货必看)

        端口陷阱:虽然我们在 Codespaces 内部监听的是 8080 端口,但由于 GitHub 的转发层强制加密,大家在客户端填写时,端口务必填 443,传输协议选择 WS,并开启 TLS。

        连接验证:一旦客户端配置正确并点击连接,你的终端会立刻跳出绿色的 connection accepted 字样。看到这个日志,就说明你已经成功免费试用到了微软的高速网络!

        休眠机制:请注意,Codespaces 在无操作一段时间后会自动休眠。如果发现连不上了,记得登录 GitHub 重新启动该容器即可。

    结语

    通过这种手动配置的方式,我们不仅绕过了繁琐的脚本报错,还深刻理解了连接点运行的底层逻辑。这种利用云端资源的方式非常适合临时办公和技术研究。

mkdocs-blog-plugin(静态网站程序mkdocs的博客插件)

 This plugin for MkDocs allows to keeps a really simple blog section inside your documentation site. 

 

Blogs for MkDocs » (MkDocs-Blog-Plugin)

This plugin allows you to host a tiny blog section in your MkDocs site.
Move away, WordPress... well, not really.

https://raw.githubusercontent.com/fmaida/mkdocs-blog-plugin/master/screenshot.png

How does it work ?

It's quite simple. 90% of the work is already done by MkDocs itself.
Each time you will build your MkDocs site or serve it, this plugin will try to find a specific directory in your documentation folder. If it finds it, every document and every subdirectory nested in it will be listed in reverse on the navbar. Plus, if you will have too many documents to be listed at once, the plugin will try to organize your remaining documents in subfolders.

How can I install it ?

You can install it through pip with this command:
pip install mkdocs-blog-plugin
Then, open your mkdocs.yml configuration file and add these lines:
plugins:
    - blog
Last but not least, enter you docs folder and create a new subfolder and name it blog. This plugin will try to find blog articles inside this directory.

Then you are ready to begin.

How can I add new articles to my blog section ?

Inside docs/blog create a folder for each year you are planning to add new articles. Then, inside each year folder create twelve folders, numbered from 01 to 12 for each month. Finally, in each month folder for each day create a corresponding folder but remember to add a leading zero (for example: 08, 09, 10, ...) Now, for every article you will go inside the corresponding `year/month/day folder and you will create a new file there. While it is not necessary that you keep this strict naming convention, this will help the plugin to understand when your article was made.
For example, this is how I manage my blog folder:
docs
├── blog
│   ├── 2019
│   └── 2020
│       ├── 01
│       │   ├── 20
│       │   │   └── first-article.md
│       │   └── 26
│       │       └── second-article.md
│       ├── 02
│       │   ├── 01
│       │   │   └── third_article.md
│       │   └── 09
│       │       └── fourth-article.md
│       └── 03
│           └── 16
│               └── fifth-article.md
└── index.md

Customizing the plugins

You can customize this plugin by adding some parameters in the mkdocs.yml file, like this:
- plugin:
      - blog:
          format: "(%m/%d/%y)"
          text-align: "right"
Here is a brief list of every parameters supported by the current version of the plugin:

folder

This is the section / folder in which we'll try to build our blog
Default value: "blog"

articles

How many articles do we have to display on our blog at once? More articles will be displayed in the corresponding subsection
Default value: 6 articles

more-articles

Let's allow our user to slightly customize the "previous articles" section. How do we have to name this section if it will contains more articles? Remember to put a percentage character wherever you want this plugin to insert the number of available articles.
Default value: "More articles (%)"

pagination

Which name do we have to give to each subsection inside our "more articles" section? Remember to put two percentage characters wherever you want this plugin to insert the actual number page and the total amount of pages made.
Default value: Page % of %"

display-more-articles

Can we display the previous articles section, or is it better if we hide it?
Default: True

display-article-date

Can we display the article date in the navbar, or is it better if we hide it?
Default: True

format

How we have to display an article publication date on our navbar?
You can use these placeholders inside your string:
  • %d = Day
  • %m = Month
  • %y = Year (2-digits)
  • %Y = Year (4-digits)

Default value: "[%d/%m]"

text-align

Do we have to display an article publication date on the left side ("left") or on the right side ("right")?
Default value: "left"

from  https://github.com/fmaida/mkdocs-blog-plugin

-----

相关帖子:

在linux vps上,搭建基于python的静态网站程序-mkdocs

 

a laravel-blog-app

 https://github.com/ajaymarathe/laravel-blog-app

mbonat_site

 

This is my (old) personal website. I built it in Ruby on Rails with Haml and other tools. Includes: portfolio section, resume, speaking, and blog with the most recent blog post on the home page. It's open source feel free to fork it.

This is the personal website for Michelle Bonat, built by her (me).

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

  • Postgres (OSX users can run brew install postgresql)
  • bundler (gem install bundler)
  • Ruby 2.2.2
  • Any environment variables you prefer to setup and use

Installing

  • bundle install
  • (start your Postgres db)
  • rake db:create (TODO: create seed data)
  • (remember to migrate which in a Rails 4 app is rake db:migrate)

To create an initial admin user, fire up rails c and do the following:

u = User.create(username: "Whatever", password: "foo123456", email: "me@domain.org", password_confirmation: "foo123456")
u.activate!
u.is_admin = true
u.save

Running the server

  • rails s

Running the tests

There are pre-seeded rspec tests. To run these it is 'rspec spec' from your command line.

More about the tests

These pre-seeded tests are based on factories for posts and users, and include feature, model, and policy tests. See the RSpec folder for details.

Deployment

Since this is a Ruby application, deploying it to Heroku is easy.

Built With

  • Ruby
  • Rails 4

And the usual suspects including:

  • Html
  • CSS
  • Javascript

from  https://github.com/michellebonat/mbonat_site

伊朗突然下令全面反击美国!特朗普面临重大抉择

-特朗普的所作所为进一步加速了美国的衰落. 美国被犹太金融资本掏空了,大玩金融业,导致制造业空心化,现在连足够的高超音速导弹都生产不出来,特朗普真是回天乏力,徒唤奈何。

中國Kimi K3挑戰美科技霸權 全球AI重新洗牌!中國EUV原型機曝光

 

中国的科研人员厉害!

在linux vps上,安装建站程序sunengine

 

Installing Asp.Net Core Runtime

Link to instruction.

# Add repository

wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb

sudo dpkg -i packages-microsoft-prod.deb

# Install packages

sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install aspnetcore-runtime-3.1

# Install PostgreSql

Link to manual.

# PostgreSql one more package

sudo apt-get install postgresql-11

# Set password for postgres user

# Postgres console opening

sudo -u postgres psql

# Set user password

ALTER USER postgres PASSWORD 'postgres_user_password';

Enter the password instead postgres_user_password

# Create a database

CREATE DATABASE my_site.com;

my_site.com - database name

# We collect the project locally and write to the server

Clone the sources of SunEngine from official repository to your computer.

All build and publication scripts are located in the Scripts/ directory

In the Scripts/ directory, copy the file PUBLISH.template toPUBLISH and edit it, setting all the parameters

We assemble the project by executing the script - build.sh (the folderbuild appears in the root directory of the project)

Create the /site/my_site.com folder on the server. The path can be any.

We put build on the server, running the scriptpubli.sh

On the server, edit the configuration files in the directory /site/my_site.com/Config

# Connection settings

In the file /Config/DataBaseConnection.json you must specify the database name, user postgres and password.

{
 "DataBaseConnection": {   
    "Linq2dbProvider": "PostgreSQL.9.5",
    "FluentMigratorProvider": "Postgres",
    "ConnectionString": "Host=localhost;Database=my_site.com;Username=postgres;Password=postgres_user_password"
  }
}

# Fill the database with initial data

In the directory /site/my_site.com/Server run

dotnet SunEngine.dll init migrate

This commandline creates tables and other structures in the database and fills with the initial data.

Read more about the dotnet SunEngine.dll commands in this article.

# Create a kestrel service on systemd

Link to instruction.

systemd allows after the server starts to constantly keep the necessary processes running, and restart if they are forced to turn off.

Create the file my_site.com.service in /etc/systemd/system directory

  [Unit]
  Description=SunEngine my_site.com

  [Service]
  WorkingDirectory=/site/my_site.com
  ExecStart=/usr/bin/dotnet /site/my_site.com/Server/SunEngine.dll server
  SyslogIdentifier=my_site.com
  User=www-data
  Restart=always
  RestartSec=10
  KillSignal=SIGINT
  Environment=ASPNETCORE_ENVIRONMENT=Production

  [Install]
  WantedBy=multi-user.target

# Enable systemd service

systemctl enable my_site.com

# Commandlines to hack

# Check the systemd process logs

journalctl -fxeu my_site.com

# Restart systemd process

systemctl restart my_site.com

# Configuration Nginx

Link to instruction.

# Installing Nginx

sudo apt update && sudo apt full-upgrade
sudo apt install nginx

# Creating configuration of Nginx

First create the file /etc/nginx/sites-available/my_site.com and fill it with

server {
    listen 443 http2; # https port
    listen [::]:443 http2; # IP v6

    server_name my_site.site; # domen

    charset utf-8;

    ssl on; # turn on ssl
    ssl_certificate /etc/ssl/mysite.site/my_site.com.crt; # path to ssl sertificate
    ssl_certificate_key /etc/ssl/mysite.site/my_site.com.key; # path to ssl sertificates key

    gzip on; # enable gzip flow archiving
    gzip_buffers 16 8k;
    gzip_comp_level 6;
    gzip_http_version 1.1;
    gzip_min_length 256;
    gzip_proxied any;
    gzip_vary on;
    gzip_types text/xml application/atom+xml application/rss+xml application/xhtml+xml text/javascript application/javascript
        application/x-javascript text/x-json application/json application/x-web-app-manifest+json text/css text/plain
        text/html font/opentype application/x-font-ttf image/x-icon image/svg+xml;
    gzip_disable "msie6";

    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Content-Type-Options "nosniff";

    location / { # Endpoint to frontend
        root /site/my_site.com/wwwroot;
        try_files $uri $uri/ /index.html; # if the file is not found return index.html

        open_file_cache max=1000 inactive=20s; # caching client files on the server
        open_file_cache_valid 30s;
        open_file_cache_min_uses 2;
        open_file_cache_errors on;
    }

    location ~ \.(js|json|css|svg|svgz|eot|otf|woff|woff2|ttf|rss|atom|ico|jpg|jpeg|gif|png)$ { # browser caching
        expires 14d; # keep cache for 14 days
    }

    location /api/ { # Endpoint to backend. Works as a reverse proxy by sending requests to Kestrel as a separate process.
        proxy_pass http://localhost:5000/; # The port must match the settings kestrel in "Config/SunEngine.json"
        client_max_body_size 11M; # maximum request body size that Nginx allows ~= maximum size for upload file
    }
}

server { # redirect in case of login via http
    listen 80;
    listen [::]:80;
    server_name mysite.site;
    return 301 https://$host$request_uri;
}

# Activate my_site.com settings

sudo ln -s /etc/nginx/sites-available/my_site.com /etc/nginx/sites-enabled/my_site.com

# Reload Nginx Settings

sudo systemctl reload nginx 
from https://sunengine.github.io/src/en/manual-install_en/step_by_step_server_installation_en.html