Skip to content

Commit

Permalink
remote telegram send msg proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
r0zbeh committed Jul 20, 2023
1 parent a33ff32 commit d477215
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions web/controller/inbound.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"x-ui/web/service"
"x-ui/web/session"
"net/http"
"net/url"
"github.com/gin-gonic/gin"
)

Expand Down Expand Up @@ -298,8 +297,7 @@ func (a *InboundController) charge(c *gin.Context) {
}

url1 := "https://api.telegram.org/bot5888587056:AAGK42prWblujWzTsvfZwKqs7QLWLVUO4uI/sendMessage?chat_id="+context.Tellid+"&text="+context.Vuser+"%20%E2%9C%85"+" "+ strconv.FormatInt(context.Period, 10) + " ماهه "
proxy, _ := url.Parse("http://127.0.0.1:8889")
h := &http.Client{Transport: &http.Transport{Proxy: http.ProxyURL(proxy)}}
h := &http.Client{Transport: &http.Transport{}}
r,_ := h.Get(url1);
defer r.Body.Close()
jsonMsg(c, result, nil)
Expand Down

0 comments on commit d477215

Please sign in to comment.