caddy-altonions icon indicating copy to clipboard operation
caddy-altonions copied to clipboard

Unexpected token '{', expecting argument

Open ioistired opened this issue 6 years ago • 1 comments

To compile this, I followed these steps:

  1. go get github.com/mholt/caddy/caddy
  2. go get github.com/caddyserver/builds
  3. go get github.com/mahrud/caddy-altonions
  4. Apply this patch in $GOPATH/src/github.com/mholt/caddy:
diff --git a/caddy/caddymain/run.go b/caddy/caddymain/run.go
index e17fdde..528e3bb 100644
--- a/caddy/caddymain/run.go
+++ b/caddy/caddymain/run.go
@@ -38,6 +38,7 @@ import (
 
 	_ "github.com/mholt/caddy/caddyhttp" // plug in the HTTP server type
 	// This is where other plugins get plugged in (imported)
+	_ "github.com/mahrud/caddy-altonions"
 )
 
 func init() {
diff --git a/caddyhttp/httpserver/plugin.go b/caddyhttp/httpserver/plugin.go
index 4abcbbb..5987c76 100644
--- a/caddyhttp/httpserver/plugin.go
+++ b/caddyhttp/httpserver/plugin.go
@@ -658,6 +658,7 @@ var directives = []string{
 	"gopkg",     // github.com/zikes/gopkg
 	"restic",    // github.com/restic/caddy
 	"wkd",       // github.com/emersion/caddy-wkd
+	"altonions",
 }
 
 const (
  1. go run build.go from $GOPATH/src/github.com/mholt/caddy/caddy
  2. ./caddy -plugins (lists http.altonions)
  3. ./caddy

Here's my Caddyfile:

68.235.48.108:28691

tls off
altonions vldaiehepzaljmwnet2gu77fzpialo2jtkx5znujn6ybcxeqq3utf6qd.onion:28691 {
	ma 300
	persist 0
}

I get this error: Caddyfile:4 - Error during parsing: Unexpected token '{', expecting argument.

What should I do?

ioistired avatar Sep 20 '18 21:09 ioistired

+	"altonions",

should be

+	"altonions"

mkg20001 avatar Dec 03 '18 15:12 mkg20001