Use HTTPS

This commit is contained in:
Jeffrey Serio 2023-07-19 11:06:55 -05:00
parent a3578c5767
commit c15debc40a
2 changed files with 10 additions and 2 deletions

View File

@ -81,7 +81,11 @@ type TorrentStatsPageData struct {
} }
func main() { func main() {
transmissionbt, err := transmissionrpc.New(os.Getenv("TRANSMISSION_RPC_URL"), os.Getenv("TRANSMISSION_RPC_USER"), os.Getenv("TRANSMISSION_RPC_PASSWORD"), nil) transmissionbt, err := transmissionrpc.New(os.Getenv("TRANSMISSION_RPC_URL"), os.Getenv("TRANSMISSION_RPC_USER"), os.Getenv("TRANSMISSION_RPC_PASSWORD"),
&transmissionrpc.AdvancedConfig{
HTTPS: true,
Port: 443,
})
if err != nil { if err != nil {
log.Fatalln(err) log.Fatalln(err)
} }

View File

@ -83,7 +83,11 @@ func main() {
fmt.Println("20 text/gemini\r") fmt.Println("20 text/gemini\r")
fmt.Println("```") fmt.Println("```")
transmissionbt, err := transmissionrpc.New(os.Getenv("TRANSMISSION_RPC_URL"), os.Getenv("TRANSMISSION_RPC_USER"), os.Getenv("TRANSMISSION_RPC_PASSWORD"), nil) transmissionbt, err := transmissionrpc.New(os.Getenv("TRANSMISSION_RPC_URL"), os.Getenv("TRANSMISSION_RPC_USER"), os.Getenv("TRANSMISSION_RPC_PASSWORD"),
&transmissionrpc.AdvancedConfig{
HTTPS: true,
Port: 443,
})
if err != nil { if err != nil {
log.Fatalln(err) log.Fatalln(err)
} }