diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2023-05-23 00:22:15 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2023-05-23 00:22:15 +0300 |
| commit | 783fa856c32e1b9a66e31ec2864437691f0653a5 (patch) | |
| tree | d645ddba9a0e491b6cdc5bd38da56174a3ff1b43 | |
| parent | 6139effb8ae69c6b0d2d31d3f98f00ad4be25fd7 (diff) | |
Fix deprecated gRPC Dial options for Insecure connections
| -rw-r--r-- | web/html/xui/form/inbound.html | 2 | ||||
| -rw-r--r-- | xray/process.go | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/web/html/xui/form/inbound.html b/web/html/xui/form/inbound.html index 9b4c7904..383105ac 100644 --- a/web/html/xui/form/inbound.html +++ b/web/html/xui/form/inbound.html @@ -53,7 +53,7 @@ </span> <a-date-picker :show-time="{ format: 'HH:mm:ss' }" format="YYYY-MM-DD HH:mm:ss" :dropdown-class-name="themeSwitcher.darkCardClass" - v-model="dbInbound._expiryTime" style="width: 300px;"></a-date-picker> + v-model="dbInbound._expiryTime" style="width: 250px;"></a-date-picker> </a-form-item> </a-form> diff --git a/xray/process.go b/xray/process.go index e7774ea4..3ce016ed 100644 --- a/xray/process.go +++ b/xray/process.go @@ -20,6 +20,7 @@ import ( "github.com/Workiva/go-datastructures/queue" statsservice "github.com/xtls/xray-core/app/stats/command" "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" ) var trafficRegex = regexp.MustCompile("(inbound|outbound)>>>([^>]+)>>>traffic>>>(downlink|uplink)") @@ -243,7 +244,7 @@ func (p *process) GetTraffic(reset bool) ([]*Traffic, []*ClientTraffic, error) { if p.apiPort == 0 { return nil, nil, common.NewError("xray api port wrong:", p.apiPort) } - conn, err := grpc.Dial(fmt.Sprintf("127.0.0.1:%v", p.apiPort), grpc.WithInsecure()) + conn, err := grpc.Dial(fmt.Sprintf("127.0.0.1:%v", p.apiPort), grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { return nil, nil, err } |
