You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// support proxy
// concurrency setting
// as subscription server
// profiles filter
// clash to vmess local subscription
func getSubscriptionLinks(link string) ([]string, error) {
tr := &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
}
c := http.Client{
Timeout: 20 * time.Second,
Transport: tr,
}
resp, err := c.Get(link)
###########################
Sometimes I will use python3 http.server to start https server to serve subscription link, {InsecureSkipVerify: true} is convenient for such a scenario.
#!/usr/bin/env python3
#by Honghe
#Ported to Python 3 by Telmo "Trooper" ([email protected])
vi web/profile.go
#######################
package web
import (
"net/http"
"crypto/tls"
#######################
// support proxy
// concurrency setting
// as subscription server
// profiles filter
// clash to vmess local subscription
func getSubscriptionLinks(link string) ([]string, error) {
tr := &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
}
c := http.Client{
Timeout: 20 * time.Second,
Transport: tr,
}
resp, err := c.Get(link)
###########################
Sometimes I will use python3 http.server to start https server to serve subscription link, {InsecureSkipVerify: true} is convenient for such a scenario.
#!/usr/bin/env python3
#by Honghe
#Ported to Python 3 by Telmo "Trooper" ([email protected])
#Original code from:
#http://www.piware.de/2011/01/creating-an-https-server-in-python/
#https://gist.github.com/dergachev/7028596
#To generate a certificate use:
#openssl req -newkey rsa:4096 -nodes -keyout key.pem -x509 -days 365 -out cert.pem
from http.server import HTTPServer, SimpleHTTPRequestHandler
import ssl
port = 4443
httpd = HTTPServer(('127.0.0.1', port), SimpleHTTPRequestHandler)
httpd.socket = ssl.wrap_socket(httpd.socket, keyfile='key.pem', certfile="cert.pem", server_side=True)
print("Server running on https://127.0.0.1:" + str(port))
httpd.serve_forever()
##################################
Above solution tested, it works
The text was updated successfully, but these errors were encountered: