mirror of
https://github.com/TeamPiped/http3-ytproxy.git
synced 2024-08-14 23:56:43 +00:00
cr fixes
This commit is contained in:
parent
53486a474c
commit
1c31ae7558
1 changed files with 2 additions and 3 deletions
5
main.go
5
main.go
|
@ -118,6 +118,7 @@ func (*requesthandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
||||||
|
|
||||||
path = strings.Replace(path, "/ggpht", "", 1)
|
path = strings.Replace(path, "/ggpht", "", 1)
|
||||||
path = strings.Replace(path, "/i/", "/", 1)
|
path = strings.Replace(path, "/i/", "/", 1)
|
||||||
|
|
||||||
proxyURL, err := url.Parse("https://" + host + path)
|
proxyURL, err := url.Parse("https://" + host + path)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -252,9 +253,7 @@ func RelativeUrl(in string) (newurl string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
if len(os.Args) == 2 {
|
path_prefix = os.Getenv("PREFIX_PATH")
|
||||||
path_prefix = os.Args[1]
|
|
||||||
}
|
|
||||||
|
|
||||||
socket := "socket" + string(os.PathSeparator) + "http-proxy.sock"
|
socket := "socket" + string(os.PathSeparator) + "http-proxy.sock"
|
||||||
syscall.Unlink(socket)
|
syscall.Unlink(socket)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue