aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md6
-rw-r--r--config-init5
-rw-r--r--main.go5
-rw-r--r--static/faq.html12
-rw-r--r--static/main.html2
-rw-r--r--verification.go2
6 files changed, 24 insertions, 8 deletions
diff --git a/README.md b/README.md
index 2f6740d..721b836 100644
--- a/README.md
+++ b/README.md
@@ -65,6 +65,8 @@ Any contributions or suggestions are appreciated. Best way to give immediate fee
`dbpass:password` Database password for dbuser.
+ `torproxy:127.0.0.1:9050` Tor proxy route and port, leave blank if you do not want to support
+
Currently e-mail is not implemented to do anything special, but the code is in place
@@ -78,9 +80,9 @@ Any contributions or suggestions are appreciated. Best way to give immediate fee
### local testing
- When testing on a local env when setting the `instance` value in the config file you have to append the port number to the local address eg. `instance:localhost:3000` with `instanceport` also being set to the same port.
+ When testing on a local env when setting the `instance` value in the config file you have to append the port number to the local address eg. `instance:localhost:3000` with `instanceport` also being set to the same port.
- If you want to test federation between servers locally you have to use your local ip as the `instance` eg. `instance:192.168.0.2:3000` and `instance:192:168:0:3:3000` adding the port to localhost will not route correctly.
+ If you want to test federation between servers locally you have to use your local ip as the `instance` eg. `instance:192.168.0.2:3000` and `instance:192:168:0:3:3000` adding the port to localhost will not route correctly.
### Managing the server
diff --git a/config-init b/config-init
index 7da7b26..6ca4aa9 100644
--- a/config-init
+++ b/config-init
@@ -1,4 +1,4 @@
-instance:server.fchan.xyz
+instance:fchan.xyz
instancetp:https://
instanceport:3000
instancename:FChan
@@ -6,7 +6,7 @@ instancesummary:FChan is a federated image board instance.
dbhost:localhost
dbport:5432
-dbname:fchan_server
+dbname:server
dbuser:postgres
dbpass:password
@@ -15,3 +15,4 @@ emailport:
emailaddress:
emailpass:
+torproxy: \ No newline at end of file
diff --git a/main.go b/main.go
index c632e53..a8faeca 100644
--- a/main.go
+++ b/main.go
@@ -1491,6 +1491,11 @@ func ParseCommentForReplies(comment string) []ObjectBase {
func CheckValidActivity(id string) (Collection, bool) {
+ re := regexp.MustCompile(`.+\.onion(.+)?`)
+ if re.MatchString(id) {
+ id = strings.Replace(id, "https", "http", 1)
+ }
+
req, err := http.NewRequest("GET", id, nil)
if err != nil {
diff --git a/static/faq.html b/static/faq.html
index 4398466..8c7c4fe 100644
--- a/static/faq.html
+++ b/static/faq.html
@@ -1,7 +1,12 @@
<!DOCTYPE html>
<html>
+ <head>
+ <style>
+ a { color: black; }
+ </style>
+ </head>
<body style="background-color:#ffffee; max-width: 800px; margin: 0 auto;">
- <a style="color: black;" href="javascript:history.back()">[Back]</a>
+ <a href="javascript:history.back()">[Back]</a>
<h1 style="text-align: center;">FAQ</h1>
<div>
<h4>What is fchan</h4>
@@ -29,7 +34,10 @@
<p>sequential numbers have run their course. random base 16 (now base 36) is better.</p>
<h4>Activitypub specific examples</h4>
- <p>coming soon(tm).</p>
+ <p>coming soon(tm).</p>
+
+ <h4>Server Version</h4>
+ <p>v0.0.1</p>
</div>
<div style="width: 500px; margin:0 auto; margin-top: 50px; text-align: center;">
<a href="/">[Home]</a><a href="/static/rules.html">[Rules]</a><a href="/static/faq.html">[FAQ]</a>
diff --git a/static/main.html b/static/main.html
index 91d8344..72ed321 100644
--- a/static/main.html
+++ b/static/main.html
@@ -90,7 +90,7 @@
{{ template "content" . }}
{{ template "bottom" . }}
- <div style="width: 500px; margin:0 auto; margin-top: 50px; text-align: center;">
+ <div align="center" style="width: 500px; margin:0 auto; margin-top: 50px;">
<a href="/">[Home]</a><a href="/static/rules.html">[Rules]</a><a href="/static/faq.html">[FAQ]</a>
<p>All media are copyright to their respective owners.</p>
</div>
diff --git a/verification.go b/verification.go
index db44689..38c7bbe 100644
--- a/verification.go
+++ b/verification.go
@@ -661,7 +661,7 @@ func VerifyHeaderSignature(r *http.Request, actor Actor) bool {
t, _ := time.Parse(time.RFC1123, date)
- if(time.Now().Sub(t).Seconds() > 30) {
+ if(time.Now().Sub(t).Seconds() > 75) {
return false
}