rename the project to gophi!

Signed-off-by: kim (grufwub) <grufwub@gmail.com>
master
kim (grufwub) 4 years ago
parent 54e135666d
commit 8c1905a287

@ -1,10 +1,9 @@
# Gophor # Gophi
A server written in GoLang, with 2 separately supported protocols: A server with Gopher & Gemini protocol support in GoLang!
- A gopher server, compiled with `build-all-gopher.sh` The two protocols are supported separately, and as such you compile
the server with support for one or the other, not both.
- A gemini server, (not yet implemented)
Unix (like) OSes only. Cross-compiled to way too many architectures. Unix (like) OSes only. Cross-compiled to way too many architectures.
Build-script now much improved, but still not pretty... Build-script now much improved, but still not pretty...

@ -2,7 +2,7 @@
set -e set -e
PROJECT='gophor.gopher' PROJECT='gophi.gopher'
VERSION="$(cat 'core/server.go' | grep -E '^\s*Version' | sed -e 's|\s*Version = \"||' -e 's|\"\s*$||')" VERSION="$(cat 'core/server.go' | grep -E '^\s*Version' | sed -e 's|\s*Version = \"||' -e 's|\"\s*$||')"
LOGFILE='build.log' LOGFILE='build.log'
OUTDIR="build-gopher-${VERSION}" OUTDIR="build-gopher-${VERSION}"

@ -1,3 +1,3 @@
#!/bin/sh #!/bin/sh
CC='x86_64-linux-musl-gcc' CGO_ENABLED=1 go build -trimpath -buildmode 'pie' -a -tags 'netgo' -ldflags '-s -w -extldflags "-static"' -o gophor.gopher main_gopher.go CC='x86_64-linux-musl-gcc' CGO_ENABLED=1 go build -trimpath -buildmode 'pie' -a -tags 'netgo' -ldflags '-s -w -extldflags "-static"' -o 'gophi.gopher' main_gopher.go

@ -31,7 +31,7 @@ func setupInitialCGIEnv(safePath string) []string {
SystemLog.Info("CGI safe path: %s", safePath) SystemLog.Info("CGI safe path: %s", safePath)
env = append(env, "GATEWAY_INTERFACE=CGI/1.1") env = append(env, "GATEWAY_INTERFACE=CGI/1.1")
env = append(env, "SERVER_SOFTWARE=gophor "+Version) env = append(env, "SERVER_SOFTWARE=Gophi "+Version)
env = append(env, "SERVER_PROTOCOL="+protocol) env = append(env, "SERVER_PROTOCOL="+protocol)
env = append(env, "REQUEST_METHOD=GET") // always GET (in HTTP terms anywho) env = append(env, "REQUEST_METHOD=GET") // always GET (in HTTP terms anywho)
env = append(env, "CONTENT_LENGTH=0") // always 0 env = append(env, "CONTENT_LENGTH=0") // always 0

@ -1,3 +1,3 @@
module gophor module gophi
go 1.14 go 1.14

@ -1,6 +1,6 @@
package gopher package gopher
import "gophor/core" import "gophi/core"
// Gopher specific error codes // Gopher specific error codes
const ( const (

@ -1,7 +1,7 @@
package gopher package gopher
import ( import (
"gophor/core" "gophi/core"
"os" "os"
) )

@ -1,7 +1,7 @@
package gopher package gopher
import ( import (
"gophor/core" "gophi/core"
"os" "os"
"strings" "strings"
) )

@ -1,7 +1,7 @@
package gopher package gopher
import ( import (
"gophor/core" "gophi/core"
"os" "os"
) )

@ -2,13 +2,13 @@ package gopher
import ( import (
"flag" "flag"
"gophor/core" "gophi/core"
) )
// setup parses gopher specific flags, and all core flags, preparing server for .Run() // setup parses gopher specific flags, and all core flags, preparing server for .Run()
func setup() { func setup() {
pWidth := flag.Uint(pageWidthFlagStr, 80, pageWidthDescStr) pWidth := flag.Uint(pageWidthFlagStr, 80, pageWidthDescStr)
footerText := flag.String(footerTextFlagStr, "Gophor, a gopher server in Go!", footerTextDescStr) footerText := flag.String(footerTextFlagStr, "Gophi, a Gopher server in Go!", footerTextDescStr)
subgopherSizeMax := flag.Float64(subgopherSizeMaxFlagStr, 1.0, subgopherSizeMaxDescStr) subgopherSizeMax := flag.Float64(subgopherSizeMaxFlagStr, 1.0, subgopherSizeMaxDescStr)
admin := flag.String(adminFlagStr, "", adminDescStr) admin := flag.String(adminFlagStr, "", adminDescStr)
desc := flag.String(descFlagStr, "", descDescStr) desc := flag.String(descFlagStr, "", descDescStr)

@ -1,6 +1,6 @@
package gopher package gopher
import "gophor/core" import "gophi/core"
// We make heavy-use of string concat here instead of StringBuilder // We make heavy-use of string concat here instead of StringBuilder
// as this is performed during the setup phase of the server and therefore // as this is performed during the setup phase of the server and therefore
@ -31,7 +31,7 @@ func generateCapsTxt(desc, admin, geo string) []byte {
text += "PathEscapeCharacter=\\" + "\r\n" text += "PathEscapeCharacter=\\" + "\r\n"
text += "PathKeepPreDelimeter=FALSE" + "\r\n" text += "PathKeepPreDelimeter=FALSE" + "\r\n"
text += "\r\n" text += "\r\n"
text += "ServerSoftware=Gophor" + "\r\n" text += "ServerSoftware=Gophi" + "\r\n"
text += "ServerSoftwareVersion=" + core.Version + "\r\n" text += "ServerSoftwareVersion=" + core.Version + "\r\n"
text += "ServerDescription=" + desc + "\r\n" text += "ServerDescription=" + desc + "\r\n"
text += "ServerGeolocationString=" + geo + "\r\n" text += "ServerGeolocationString=" + geo + "\r\n"

@ -1,7 +1,7 @@
package gopher package gopher
import ( import (
"gophor/core" "gophi/core"
"regexp" "regexp"
) )

@ -1,7 +1,7 @@
package gopher package gopher
import ( import (
"gophor/core" "gophi/core"
"os" "os"
"strings" "strings"
) )
@ -50,7 +50,6 @@ func serve(client *core.Client) {
if err == nil { if err == nil {
stat, osErr := fd2.Stat() stat, osErr := fd2.Stat()
if osErr == nil { if osErr == nil {
core.SystemLog.Info("Returning fetched gophermap")
return fs.FetchFile(client, fd2, stat, gophermap, newFileContents) return fs.FetchFile(client, fd2, stat, gophermap, newFileContents)
} }

@ -1,7 +1,7 @@
package main package main
import ( import (
"gophor/gopher" "gophi/gopher"
) )
func main() { func main() {

Loading…
Cancel
Save