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.
|
|
|
|
|
2016-02-18 16:56:55 +08:00
|
|
|
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
|
|
|
}
|
|
|
|
|
2016-06-24 13:12:34 +08:00
|
|
|
// messages between control connections of frpc and frps
|
2016-03-31 18:03:44 +08:00
|
|
|
type ControlReq struct {
|
2016-03-31 18:48:18 +08:00
|
|
|
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
|
2016-07-26 00:18:19 +08:00
|
|
|
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"`
|
2016-07-26 00:18:19 +08:00
|
|
|
HostHeaderRewrite string `json:"host_header_rewrite"`
|
2016-08-29 10:53:02 +08:00
|
|
|
HttpUserName string `json:"http_username"`
|
|
|
|
HttpPassWord string `json:"http_password"`
|
2016-11-05 14:15:16 +08:00
|
|
|
SubDomain string `json:"subdomain"`
|
2016-07-26 00:18:19 +08:00
|
|
|
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
|
|
|
}
|