Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Coloryr committed Oct 23, 2021
1 parent 04f58e5 commit 869da7b
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 40 deletions.
2 changes: 2 additions & 0 deletions ColoryrServer/ASP/ColoryrServer.ASP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<ImplicitUsings>enable</ImplicitUsings>
<BaseOutputPath>..\..\build_out\ASP</BaseOutputPath>
<ApplicationIcon>ColoryrWork.ico</ApplicationIcon>
<DebugType>embedded</DebugType>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 1 addition & 3 deletions ColoryrServer/ASP/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,8 @@ public static void Main()

public static X509Certificate2? Ssl(ConnectionContext? context, string? url)
{
if (Ssls.TryGetValue(url, out var item))
{
if (url != null && Ssls.TryGetValue(url, out var item))
return item;
}
return DefaultSsl;
}

Expand Down
1 change: 1 addition & 0 deletions ColoryrServer/Core/ColoryrServer.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
<StartupObject></StartupObject>
<BaseOutputPath>..\..\build_out\Core</BaseOutputPath>
<DebugType>embedded</DebugType>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
- 可以添加ssl证书(ASP模式)
- 可以对接[ColorMirai](https://github.com/Coloryr/ColorMirai) QQ机器人
- 占用内存极少
- 可以配置端口反向代理和域名反向代理
- 业务代码修改无需重启
- 可以自己添加DLL库,并在端口文件中调用

[理论性能测试](./doc/test.md)

Expand Down
103 changes: 66 additions & 37 deletions doc/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,46 @@
## 服务器核心配置文件
```JSON
{
//反向代理(效率略低)
//反向代理(效率极低)
"Rotes": {
"turn": {
"Url": "http://127.0.0.1/"
//目标地址
"Url": "http://127.0.0.1/",
//添加的请求头
"Heads": {
"Rote": "test"
}
}
},
//SSL模式,启用后会使用https
"Ssl": false,
//SSL证书路径
"SslLocal": ".\\xxx.pfx",
//SSL证书密码
"SslPassword": "123456",
//SSL证书配置
"Ssls": {
//默认的SSL证书
"default": {
"SslLocal": "./test.sfx",
"SslPassword": "123456"
},
//某个域名的SSL证书
"www.xxx.xxx":{
"SslLocal": "./www.xxx.xxx.sfx",
"SslPassword": "123456"
}
},
//域名转发
"UrlRotes": {
//目标域名
"www.test.com": {
//目标地址
"Url": "http://localhost:81/",
//添加的请求头
"Heads": {
"Rote": "test"
}
}
},
//是否启用反向代理
"RoteEnable": false,
//控制台输入无效
"NoInput": false,
//Http服务器配置,可以添加监听数量
Expand Down Expand Up @@ -45,57 +73,58 @@
//Mysql配置
"Mysql": [
{
"Enable": false,
"IP": "127.0.0.1",
"Port": 3306,
"User": "root",
"Password": "MTIzNDU2",
"ConnCount": 50,
"TimeOut": 1000,
"Conn": "SslMode=none;Server={0};Port={1};User ID={2};Password={3};Charset=utf8;"
"Enable": false,
"IP": "127.0.0.1",
"Port": 3306,
"User": "root",
"Password": "MTIzNDU2",
"ConnCount": 50,
"TimeOut": 1000,
"Conn": "SslMode=none;Server={0};Port={1};User ID={2};Password={3};Charset=utf8;"
}
],
//MS sql设置
"MSsql": [
{
"Enable": false,
"IP": "127.0.0.1",
"User": "root",
"Password": "MTIzNDU2",
"ConnCount": 50,
"TimeOut": 1000,
"Conn": "Server={0};UID={1};PWD={2};"
"Enable": false,
"IP": "127.0.0.1",
"User": "root",
"Password": "MTIzNDU2",
"ConnCount": 50,
"TimeOut": 1000,
"Conn": "Server={0};UID={1};PWD={2};"
}
],
//Redis设置
"Redis": [
{
"Enable": false,
"IP": "127.0.0.1",
"Port": 6379,
"ConnCount": 20,
"TimeOut": 1000,
"Conn": "{0}:{1}"
"Enable": false,
"IP": "127.0.0.1",
"Port": 6379,
"ConnCount": 20,
"TimeOut": 1000,
"Conn": "{0}:{1}"
}
],
//Oracle配置
"Oracle": [
{
"Enable": false,
"IP": "127.0.0.1",
"Port": 0,
"User": "root",
"Password": "MTIzNDU2",
"ConnCount": 20,
"TimeOut": 1000,
"Conn": "User Id={2};Password={3};Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST={0})(PORT={1})))(CONNECT_DATA=(SERVICE_NAME=test)))"
"Enable": false,
"IP": "127.0.0.1",
"Port": 0,
"User": "root",
"Password": "MTIzNDU2",
"ConnCount": 20,
"TimeOut": 1000,
"Conn": "User Id={2};Password={3};Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST={0})(PORT={1})))(CONNECT_DATA=(SERVICE_NAME=test)))"
}
],
//编辑用户设置
"User": [
{
"Username": "Admin",
"Password": "4e7afebcfbae000b22c7c85e5560f89a2a0280b4"
"Username": "Admin",
//SHA1加密的密码
"Password": "4e7afebcfbae000b22c7c85e5560f89a2a0280b4"
}
],
//不参与动态编译的dll
Expand Down

0 comments on commit 869da7b

Please sign in to comment.