Git Product home page Git Product logo

scarlett518.github.io's People

Contributors

scarlett518 avatar

Stargazers

 avatar

Watchers

 avatar

scarlett518.github.io's Issues

3月21日

今天尝试搭建了coze-discord-proxy项目,最后用next-chat填入信息后没能成功使用coze的gpt
先存个档,以后有空再看看

3月22日

今天折腾了nonebot,遇到了一些问题,还没解决好,再对照着教程改改

3月20日-frp配置

之前一直用老版本ini的配置文件,用新配置文件toml的时候发现老版本的参数不能套用了
特意贴出一份frps.toml和frpc.toml模版,方便以后使用

frps.toml

# frps.toml

bindPort = 5443 				# 服务端与客户端通信端口

#服务端HTTP(s)监听端口
vhostHTTPPort = 5000
vhostHTTPSPort = 5001

auth.method = "token"   #服务端连接身份认证,默认token
auth.token = "test123"   #服务端token密码
transport.tls.force = false   #是否只接受启用了TLS的客户端连接

# Server Dashboard,可以查看frp服务状态以及统计信息
webServer.port = 6443 			# 后台管理端口
webServer.user = "admin"		# 后台登录用户名
webServer.password = "admin"	# 后台登录密码

allowPorts = [
    { start = 10000, end = 15000 },   #端口范围设置为10000-15000可用
    { start = 30000, end = 40000 },   #同理,可设置多个端口范围开放
    { single = 25565 },   #单端口设置,指定25565端口可用
    { single = 25566 }    #同理,可以设置多个单端口开放
]

transport.maxPoolCount = 50   #每条隧道可以有多少IP连接
transport.maxPortsPerClient = 30   #每个客户端可以创建多少隧道


frpc.toml

#frpc.toml

serverAddr = "x.x.x.x"   #服务器地址
serverPort = 5443   #服务器端口
auth.method = "token"   #服务端连接身份认证,默认token
auth.token = "test123"   #服务端token密码,密码不正确将无法连接服务器
transport.tls.enable = false   #是否和服务端之间启用TLS连接
transport.tls.disableCustomTLSFirstByte = false
#默认为true,当配置为true时,无法和vhostHTTPSPort端口复用

[[proxies]]
name = "xxx"   #隧道名称,可自定义,不能重复
type = "tcp"   #隧道类型,可用tcp, udp, http, https, tcpmux, stcp, sudp, xtcp
localIP = "127.0.0.1"   #本地IP地址,如果是本机就127.0.0.1
localPort = xxx   #本地端口,本地服务端口,比如mc服务器端口25565
remotePort = xxxxx    #远程端口,连接隧道时用的端口
transport.useEncryption = true   #传输加密,加密算法采用 aes-128-cfb
transport.useCompression = true   #传输压缩,压缩算法采用 snappy

[[proxies]]
name = "xxx"   #隧道名称,可自定义,不能重复
type = "udp"   #隧道类型,可用tcp, udp, http, https, tcpmux, stcp, sudp, xtcp
localIP = "xxx.xxx.xxx.xxx"   #本地IP地址,如果是本机就127.0.0.1
localPort = xxx   #本地端口,本地服务端口,比如mc服务器端口25565
remotePort = xxxxx    #远程端口,连接隧道时用的端口
transport.useEncryption = true   #传输加密,加密算法采用 aes-128-cfb
transport.useCompression = true   #传输压缩,压缩算法采用 snappy

windows运行

第一种:当前目录下bat启动

服务端

frps -c frps.toml

客户端

frpc -c frpc.toml

第二种官网下载使用nssm工具
解压后放在frpsfrpc目录下,在上方路径中输入cmd进入到当前路径下输入

nssm install frps

输完命令回车后会弹个窗口,根据实际情况按下图填后按Install service即可

之后到任务管理器→服务 中找到frpsfrpc服务后右键开始就没问题了。如果之后要更新frps.tomlfrps.toml配置文件,再次找到此处右键重新启动就没问题了

linux运行

新建frps.service或frpc.service文件在 /etc/systemd/system/路径下,写入

[Unit]
Description=xxx             #frpc或frps
After=network.target syslog.target
Wants=network.target

[Service]
Type=simple
ExecStart=/usr/local/frpc/frpc -c /usr/local/frpc/frpc.toml   #填写frpc或frps的安装目录
Restart=always

[Install]
WantedBy=multi-user.target

保存退出后输入下方内容即可设置为开机自启

frpc.service

systemctl enable frpc   #开启开机自启动frpc服务
systemctl disable frpc   #关闭开机自启动frpc服务
systemctl start frpc   #启动frpc服务
systemctl stop frpc   #停止frpc服务
systemctl status frpc   #查看frpc服务状态

frps.service

systemctl enable frps   #开启开机自启动frps服务
systemctl disable frps   #关闭开机自启动frps服务
systemctl start frps   #启动frps服务
systemctl stop frps   #停止frps服务
systemctl status frps   #查看frps服务状态

其实Linux有大佬提供的一键安装脚本

MvsCode大佬提供的frps一键安装脚本

安装

Gitee

wget https://gitee.com/mvscode/frps-onekey/raw/master/install-frps.sh -O ./install-frps.sh
chmod 700 ./install-frps.sh
./install-frps.sh install

Github

wget https://raw.githubusercontent.com/mvscode/frps-onekey/master/install-frps.sh -O ./install-frps.sh
chmod 700 ./install-frps.sh
./install-frps.sh install

卸载

./install-frps.sh uninstall

更新

./install-frps.sh update

Server management(服务管理器)

Usage: /etc/init.d/frps {start|stop|restart|status|config|version}

stilleshan大佬提供的frpc一键安装脚本

安装

wget https://raw.githubusercontent.com/stilleshan/frpc/master/frpc_linux_install.sh && chmod +x frpc_linux_install.sh && ./frpc_linux_install.sh

国内镜像

wget https://github.ioiox.com/stilleshan/frpc/raw/branch/master/frpc_linux_install.sh && chmod +x frpc_linux_install.sh && ./frpc_linux_install.sh

使用

vi /usr/local/frp/frpc.toml
# 修改 frpc.toml 配置
sudo systemctl restart frpc
# 重启 frpc 服务即可生效

卸载

Gitee

wget https://raw.githubusercontent.com/stilleshan/frpc/master/frpc_linux_uninstall.sh && chmod +x frpc_linux_uninstall.sh && ./frpc_linux_uninstall.sh

国内镜像

wget https://github.ioiox.com/stilleshan/frpc/raw/branch/master/frpc_linux_uninstall.sh && chmod +x frpc_linux_uninstall.sh && ./frpc_linux_uninstall.sh

自建github加速地址

https://gh.151314.xyz/

参考

Mint's Blog
MvsCode
stilleshan

3月23日

今天把nonebot整的差不多了,接下来再调整调整就可以躺平了。最后再搞个菜单

第一天

今天是营业第一天,希望能开个好头,坚持每天能更下去!

3月19日-c语言回顾

对C语言进行了巩固学习

数据类型

类型 名称 大小
char 字符型 1字节
short 短整型 2字节
int 整型 4字节
long 长整型 4字节
long long 更长的整型 8字节
float 单精度浮点型 4字节
double 双精度浮点型 8字节

局部变量与全局变量

局部变量:局部变量是在函数内部声明的变量,只能在声明它的函数内部使用。
全局变量:全局变量是在函数外部声明的变量,可以在整个程序中访问。

  1. 同名变量情况下优先使用局部变量
  2. 局部变量生命周期比较,在函数被调用时创建,在函数执行完毕时销毁。

3月24日

nonebot整完了,星铁任务做不完了呜呜呜

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.