Skip to content

Commit

Permalink
fix short addresshelper trick"
Browse files Browse the repository at this point in the history
  • Loading branch information
eyedeekay committed Jan 26, 2023
1 parent dab23c0 commit 7c3709b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func onReady() {
go func() {
<-mCopyUrl.ClickedCh
log.Println("Requesting copy short address helper:", configuration.Config().HttpsUrl+"/i2paddresshelper="+host)
clipboard.WriteAll(configuration.Config().HttpsUrl + "/i2paddresshelper=" + host)
clipboard.WriteAll(configuration.Config().HttpsUrl + "/?i2paddresshelper=" + host)
log.Println("Finished copy short address helper")
}()
}
Expand Down Expand Up @@ -185,6 +185,10 @@ func waitPass(aftername string) (bool, net.Listener, error) {
configuration.Config().HttpsUrl = "https://" + listener.Addr().(i2pkeys.I2PAddr).Base32()
log.Println(domainhelp)
}
if !strings.HasSuffix(configuration.Config().Url, "i2p") {
configuration.Config().Url = "https://" + listener.Addr().(i2pkeys.I2PAddr).Base32()
log.Println(domainhelp)
}
configuration.Config().Url = "http://" + listener.Addr().(i2pkeys.I2PAddr).Base32()
save(configuration.Config())
listener.Close()
Expand All @@ -200,6 +204,10 @@ func waitPass(aftername string) (bool, net.Listener, error) {
configuration.Config().HttpsUrl = "https://" + listener.Addr().(i2pkeys.I2PAddr).Base32()
log.Println(domainhelp)
}
if !strings.HasSuffix(configuration.Config().Url, "i2p") {
configuration.Config().Url = "https://" + listener.Addr().(i2pkeys.I2PAddr).Base32()
log.Println(domainhelp)
}
configuration.Config().Url = "http://" + listener.Addr().(i2pkeys.I2PAddr).Base32()
save(configuration.Config())
return true, listener, err
Expand Down

0 comments on commit 7c3709b

Please sign in to comment.