cutting 1.0.0
This commit is contained in:
parent
d7b3b1ca45
commit
11b0dad438
@ -47,6 +47,8 @@ const (
|
|||||||
STATUS_CERTIFICATE_NOT_ACCEPTED = 63
|
STATUS_CERTIFICATE_NOT_ACCEPTED = 63
|
||||||
STATUS_FUTURE_CERTIFICATE_REJECTED = 64
|
STATUS_FUTURE_CERTIFICATE_REJECTED = 64
|
||||||
STATUS_EXPIRED_CERTIFICATE_REJECTED = 65
|
STATUS_EXPIRED_CERTIFICATE_REJECTED = 65
|
||||||
|
|
||||||
|
SECRETSHOP_VERSION = "1.0.0"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Response struct {
|
type Response struct {
|
||||||
@ -129,7 +131,7 @@ func generateCGI(selector *url.URL, c *conn) Response {
|
|||||||
fmt.Sprintf("SERVER_NAME=%v", selector.Hostname()),
|
fmt.Sprintf("SERVER_NAME=%v", selector.Hostname()),
|
||||||
fmt.Sprintf("SERVER_PORT=%v", c.server.Port),
|
fmt.Sprintf("SERVER_PORT=%v", c.server.Port),
|
||||||
"SERVER_PROTOCOL=GEMINI",
|
"SERVER_PROTOCOL=GEMINI",
|
||||||
"SERVER_SOFTWARE=secretshop/0.1.0",
|
"SERVER_SOFTWARE=secretshop/" + SECRETSHOP_VERSION,
|
||||||
}
|
}
|
||||||
cmdout, err := cmd.Output()
|
cmdout, err := cmd.Output()
|
||||||
if ctx.Err() == context.DeadlineExceeded {
|
if ctx.Err() == context.DeadlineExceeded {
|
||||||
|
@ -41,14 +41,12 @@ func main() {
|
|||||||
wg := new(sync.WaitGroup)
|
wg := new(sync.WaitGroup)
|
||||||
wg.Add(1 + len(hole_list))
|
wg.Add(1 + len(hole_list))
|
||||||
|
|
||||||
log.Printf("Starting gemini capsule")
|
|
||||||
go func(c interface{}) {
|
go func(c interface{}) {
|
||||||
log.Fatal(ListenAndServeTLS(port, c.([]GeminiConfig)))
|
log.Fatal(ListenAndServeTLS(port, c.([]GeminiConfig)))
|
||||||
wg.Done()
|
wg.Done()
|
||||||
}(capsule_list)
|
}(capsule_list)
|
||||||
|
|
||||||
for i, h := range hole_list {
|
for _, h := range hole_list {
|
||||||
log.Printf("Starting gopherhole %v %v", i, h.Hostname)
|
|
||||||
go func(h interface{}) {
|
go func(h interface{}) {
|
||||||
hole := h.(GopherConfig)
|
hole := h.(GopherConfig)
|
||||||
gopher.Handle("/", index(gopher.Dir(hole.RootDir)))
|
gopher.Handle("/", index(gopher.Dir(hole.RootDir)))
|
||||||
@ -58,7 +56,7 @@ func main() {
|
|||||||
}(h)
|
}(h)
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Println("Done bringing up capsules and gopherholes")
|
log.Println("Loaded SecretShop " + SECRETSHOP_VERSION)
|
||||||
log.Println("Ho ho! You found me!")
|
log.Println("Ho ho! You found me!")
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user