frp/src/models/msg/msg.go

50 lines
1.7 KiB
Go
Raw Normal View History

2016-03-14 11:18:24 +08:00
// Copyright 2016 fatedier, fatedier@gmail.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package msg
2016-01-27 21:24:36 +08:00
type GeneralRes struct {
2016-02-03 18:46:24 +08:00
Code int64 `json:"code"`
Msg string `json:"msg"`
2016-01-27 21:24:36 +08:00
}
// messages between control connections of frpc and frps
2016-03-31 18:03:44 +08:00
type ControlReq struct {
Type int64 `json:"type"`
2016-06-26 22:36:07 +08:00
ProxyName string `json:"proxy_name"`
AuthKey string `json:"auth_key"`
UseEncryption bool `json:"use_encryption"`
UseGzip bool `json:"use_gzip"`
2016-07-29 23:08:00 +08:00
PoolCount int64 `json:"pool_count"`
2016-06-26 22:36:07 +08:00
// configures used if privilege_mode is enabled
PrivilegeMode bool `json:"privilege_mode"`
PrivilegeKey string `json:"privilege_key"`
ProxyType string `json:"proxy_type"`
RemotePort int64 `json:"remote_port"`
CustomDomains []string `json:"custom_domains, omitempty"`
2016-12-25 01:53:23 +08:00
Locations []string `json:"locations"`
HostHeaderRewrite string `json:"host_header_rewrite"`
HttpUserName string `json:"http_username"`
HttpPassWord string `json:"http_password"`
SubDomain string `json:"subdomain"`
Timestamp int64 `json:"timestamp"`
2016-01-27 21:24:36 +08:00
}
2016-03-31 18:03:44 +08:00
type ControlRes struct {
Type int64 `json:"type"`
Code int64 `json:"code"`
Msg string `json:"msg"`
2016-01-27 21:24:36 +08:00
}