Go to file
luyoyu 4260a9e0fd
update README.md.
.

Signed-off-by: luyoyu <8829470+chuangxxt@user.noreply.gitee.com>
2023-09-08 21:46:30 +00:00
config.json first commit 2023-09-09 05:42:24 +08:00
demo2.png first commit 2023-09-09 05:42:24 +08:00
demo.png first commit 2023-09-09 05:42:24 +08:00
install.sh first commit 2023-09-09 05:42:24 +08:00
qrcode.jpg first commit 2023-09-09 05:42:24 +08:00
README.md update README.md. 2023-09-08 21:46:30 +00:00
share-copilot first commit 2023-09-09 05:42:24 +08:00
uninstall.sh first commit 2023-09-09 05:42:24 +08:00
version.json first commit 2023-09-09 05:42:24 +08:00

shared-pilot 一个简单的web服务器

1.安装

git clone https://gitee.com/chuangxxt/share-copilot.git
cd share-copilot
bash install.sh

2.配置

2.1 config.json文件说明
domain//绑定域名

host //ip

port //端口-必须443

certPath//公钥路径-必须

keyPath//私钥路径-必须

github_api_url//默认不改

token//你自己的真实副驾驶token,可放多个,请求时随机使用

verification//自定义验证token
2.2 示例
{
	"server": {
		"domain": "example.com",
		"host": "0.0.0.0",
		"port": 443,
		"certPath":"./example.pem",
		"keyPath":"./example.pem"
	},
	"copilot_config":{
		"github_api_url": "https://api.github.com/copilot_internal/v2/token",
		"token":[
			"yours_token_1",
            "yours_token_2",
            "yours_token_3"
		]},
	"verification":""
}

格式不能错,不确定的去这里验证 ->https://www.json.cn/

3.启动

scop r  --运行
scop rb --后台运行
scop st --停止
scop v  --查看状态

4.完整示例一:

config.json

{
	"server": {
		"domain": "api.example.com",
		"host": "0.0.0.0",
		"port": 443,
		"certPath":"./example.pem",
		"keyPath":"./example.pem"
	},
	"copilot_config":{
		"github_api_url": "https://api.github.com/copilot_internal/v2/token",
		"token":[
		"ghu_xMNAYLcJAPqAfiGoobrWffkJoNcGMVJtETKA",
        "ghu_GZgKFwraHorAxXXUvsUclOhxiYERPsSJeNuF",
        "ghu_SPUTCLvkMKoeMstPJmhSlYsYvCojhkFjGubl"
		]},
	"verification":"i_am_free"
}

运行截图

image-20230909050657331

本地host.json

{"github.com":{"user":"suibian","oauth_token":"i_am_free","dev_override":{"copilot_token_url":"https://api.example.com/copilot_internal/v2/token"}}} 
image-20230909050931364 qrcode