mirror of
https://github.com/fatedier/frp.git
synced 2025-12-12 10:58:14 +00:00
support yaml/json/toml configuration format, make ini deprecated (#3599)
This commit is contained in:
@@ -25,24 +25,18 @@ import (
|
||||
"net/url"
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
v1 "github.com/fatedier/frp/pkg/config/v1"
|
||||
)
|
||||
|
||||
type HTTPPluginOptions struct {
|
||||
Name string `ini:"name"`
|
||||
Addr string `ini:"addr"`
|
||||
Path string `ini:"path"`
|
||||
Ops []string `ini:"ops"`
|
||||
TLSVerify bool `ini:"tls_verify"`
|
||||
}
|
||||
|
||||
type httpPlugin struct {
|
||||
options HTTPPluginOptions
|
||||
options v1.HTTPPluginOptions
|
||||
|
||||
url string
|
||||
client *http.Client
|
||||
}
|
||||
|
||||
func NewHTTPPluginOptions(options HTTPPluginOptions) Plugin {
|
||||
func NewHTTPPluginOptions(options v1.HTTPPluginOptions) Plugin {
|
||||
url := fmt.Sprintf("%s%s", options.Addr, options.Path)
|
||||
|
||||
var client *http.Client
|
||||
|
||||
Reference in New Issue
Block a user