mirror of
https://github.com/lejianwen/rustdesk-api.git
synced 2026-02-13 17:50:50 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3679fcc874 | ||
|
|
d085b4e3c2 |
@@ -177,6 +177,9 @@ logger:
|
|||||||
path: "./runtime/log.txt"
|
path: "./runtime/log.txt"
|
||||||
level: "warn" #trace,debug,info,warn,error,fatal
|
level: "warn" #trace,debug,info,warn,error,fatal
|
||||||
report-caller: true
|
report-caller: true
|
||||||
|
proxy:
|
||||||
|
enable: false
|
||||||
|
host: ""
|
||||||
```
|
```
|
||||||
|
|
||||||
### 环境变量
|
### 环境变量
|
||||||
@@ -204,6 +207,10 @@ logger:
|
|||||||
| RUSTDESK_API_RUSTDESK_RELAY_SERVER | Rustdesk的relay服务器地址 | 192.168.1.66:21117 |
|
| RUSTDESK_API_RUSTDESK_RELAY_SERVER | Rustdesk的relay服务器地址 | 192.168.1.66:21117 |
|
||||||
| RUSTDESK_API_RUSTDESK_API_SERVER | Rustdesk的api服务器地址 | http://192.168.1.66:21114 |
|
| RUSTDESK_API_RUSTDESK_API_SERVER | Rustdesk的api服务器地址 | http://192.168.1.66:21114 |
|
||||||
| RUSTDESK_API_RUSTDESK_KEY | Rustdesk的key | 123456789 |
|
| RUSTDESK_API_RUSTDESK_KEY | Rustdesk的key | 123456789 |
|
||||||
|
| ----PROXY配置----- | --------------- | ---------- |
|
||||||
|
| RUSTDESK_API_PROXY_ENABLE | 是否启用代理:`false`, `true` | `false` |
|
||||||
|
| RUSTDESK_API_PROXY_HOST | 代理地址 | `http://127.0.0.1:1080` |
|
||||||
|
|
||||||
|
|
||||||
### 运行
|
### 运行
|
||||||
|
|
||||||
|
|||||||
@@ -210,6 +210,9 @@ The prefix for variable names is `RUSTDESK_API`. If environment variables exist,
|
|||||||
| RUSTDESK_API_RUSTDESK_RELAY_SERVER | Rustdesk relay server address | 192.168.1.66:21117 |
|
| RUSTDESK_API_RUSTDESK_RELAY_SERVER | Rustdesk relay server address | 192.168.1.66:21117 |
|
||||||
| RUSTDESK_API_RUSTDESK_API_SERVER | Rustdesk API server address | http://192.168.1.66:21114 |
|
| RUSTDESK_API_RUSTDESK_API_SERVER | Rustdesk API server address | http://192.168.1.66:21114 |
|
||||||
| RUSTDESK_API_RUSTDESK_KEY | Rustdesk key | 123456789 |
|
| RUSTDESK_API_RUSTDESK_KEY | Rustdesk key | 123456789 |
|
||||||
|
| ---- PROXY ----- | --------------- | ---------- |
|
||||||
|
| RUSTDESK_API_PROXY_ENABLE | proxy_enable :`false`, `true` | `false` |
|
||||||
|
| RUSTDESK_API_PROXY_HOST | proxy_host | `http://127.0.0.1:1080` |
|
||||||
|
|
||||||
### Installation Steps
|
### Installation Steps
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,9 @@ logger:
|
|||||||
path: "./runtime/log.txt"
|
path: "./runtime/log.txt"
|
||||||
level: "warn" #trace,debug,info,warn,error,fatal
|
level: "warn" #trace,debug,info,warn,error,fatal
|
||||||
report-caller: true
|
report-caller: true
|
||||||
|
proxy:
|
||||||
|
enable: false
|
||||||
|
host: ""
|
||||||
redis:
|
redis:
|
||||||
addr: "127.0.0.1:6379"
|
addr: "127.0.0.1:6379"
|
||||||
password: ""
|
password: ""
|
||||||
@@ -45,6 +48,3 @@ oss:
|
|||||||
jwt:
|
jwt:
|
||||||
private-key: "./conf/jwt_pri.pem"
|
private-key: "./conf/jwt_pri.pem"
|
||||||
expire-duration: 360000
|
expire-duration: 360000
|
||||||
proxy:
|
|
||||||
enable: false
|
|
||||||
host: ""
|
|
||||||
@@ -5,11 +5,13 @@ import "Gwen/model"
|
|||||||
type GroupForm struct {
|
type GroupForm struct {
|
||||||
Id uint `json:"id"`
|
Id uint `json:"id"`
|
||||||
Name string `json:"name" validate:"required"`
|
Name string `json:"name" validate:"required"`
|
||||||
|
Type int `json:"type"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (gf *GroupForm) FromGroup(group *model.Group) *GroupForm {
|
func (gf *GroupForm) FromGroup(group *model.Group) *GroupForm {
|
||||||
gf.Id = group.Id
|
gf.Id = group.Id
|
||||||
gf.Name = group.Name
|
gf.Name = group.Name
|
||||||
|
gf.Type = group.Type
|
||||||
return gf
|
return gf
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -17,5 +19,6 @@ func (gf *GroupForm) ToGroup() *model.Group {
|
|||||||
group := &model.Group{}
|
group := &model.Group{}
|
||||||
group.Id = gf.Id
|
group.Id = gf.Id
|
||||||
group.Name = gf.Name
|
group.Name = gf.Name
|
||||||
|
group.Type = gf.Type
|
||||||
return group
|
return group
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user