fix auth for http tunnel
@@ -8,48 +8,48 @@ GOFILES=*.go
|
||||
|
||||
PLATFORM_LIST = \
|
||||
linux-amd64 \
|
||||
linux-arm64
|
||||
# linux-arm64
|
||||
|
||||
WINDOWS_ARCH_LIST = \
|
||||
windows-amd64 \
|
||||
windows-arm64
|
||||
|
||||
linux-amd64:
|
||||
GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go build --ldflags="-s -w" -v -x -a -o $(BINDIR)/$(NAME)-$@ $(GOFILES)
|
||||
GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go build --ldflags="-s -w" -v -x -a -o $(BINDIR)/$(NAME)-$(VERSION)-$@ $(GOFILES)
|
||||
|
||||
linux-arm64:
|
||||
GOOS=linux GOARCH=arm64 CGO_ENABLED=1 go build --ldflags="-s -w" -v -x -a -o $(BINDIR)/$(NAME)-$@ $(GOFILES)
|
||||
GOOS=linux GOARCH=arm64 CGO_ENABLED=1 go build --ldflags="-s -w" -v -x -a -o $(BINDIR)/$(NAME)-$(VERSION)-$@ $(GOFILES)
|
||||
|
||||
darwin-amd64:
|
||||
GOOS=darwin GOARCH=amd64 $(GOBUILD) -o $(BINDIR)/$(NAME)-$@ $(GOFILES)
|
||||
GOOS=darwin GOARCH=amd64 $(GOBUILD) -o $(BINDIR)/$(NAME)-$(VERSION)-$@ $(GOFILES)
|
||||
|
||||
darwin-arm64:
|
||||
GOOS=darwin GOARCH=arm64 $(GOBUILD) -o $(BINDIR)/$(NAME)-$@ $(GOFILES)
|
||||
GOOS=darwin GOARCH=arm64 $(GOBUILD) -o $(BINDIR)/$(NAME)-$(VERSION)-$@ $(GOFILES)
|
||||
|
||||
# https://github.com/tc-hib/go-winres
|
||||
windows-amd64:
|
||||
GOOS=windows GOARCH=amd64 go-winres make --in winres/winres.json --out winres/rsrc
|
||||
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w -H windowsgui" -o $(BINDIR)/$(NAME)-$@.exe $(GOFILES)
|
||||
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w -H windowsgui" -o $(BINDIR)/$(NAME)-$(VERSION)-$@.exe $(GOFILES)
|
||||
|
||||
windows-arm64:
|
||||
GOOS=windows GOARCH=arm64 go-winres make --in winres/winres.json --out winres/rsrc
|
||||
GOOS=windows GOARCH=arm64 CGO_ENABLED=0 go build -ldflags="-s -w -H windowsgui" -o $(BINDIR)/$(NAME)-$@.exe $(GOFILES)
|
||||
GOOS=windows GOARCH=arm64 CGO_ENABLED=0 go build -ldflags="-s -w -H windowsgui" -o $(BINDIR)/$(NAME)-$(VERSION)-$@.exe $(GOFILES)
|
||||
|
||||
# go install gioui.org/cmd/gogio@latest
|
||||
android:
|
||||
gogio -x -work -target android -minsdk 33 -version $(VERSION).3 -signkey build/sign.keystore -signpass android -appid gost.plus -o $(BINDIR)/$(NAME)-$(VERSION).aab .
|
||||
gogio -x -work -target android -minsdk 22 -version $(VERSION).7 -name GOST+ -signkey build/sign.keystore -signpass android -appid gost.plus -o $(BINDIR)/$(NAME)-$(VERSION).aab .
|
||||
|
||||
gz_releases=$(addsuffix .gz, $(PLATFORM_LIST))
|
||||
zip_releases=$(addsuffix .zip, $(WINDOWS_ARCH_LIST))
|
||||
|
||||
$(gz_releases): %.gz : %
|
||||
chmod +x $(BINDIR)/$(NAME)-$(basename $@)
|
||||
gzip -f -S -$(VERSION).gz $(BINDIR)/$(NAME)-$(basename $@)
|
||||
chmod +x $(BINDIR)/$(NAME)-$(VERSION)-$(basename $@)
|
||||
gzip -f -S .gz $(BINDIR)/$(NAME)-$(VERSION)-$(basename $@)
|
||||
|
||||
$(zip_releases): %.zip : %
|
||||
zip -m -j $(BINDIR)/$(NAME)-$(basename $@)-$(VERSION).zip $(BINDIR)/$(NAME)-$(basename $@).exe
|
||||
zip -m -j $(BINDIR)/$(NAME)-$(VERSION)-$(basename $@).zip $(BINDIR)/$(NAME)-$(VERSION)-$(basename $@).exe
|
||||
|
||||
releases: $(gz_releases) $(zip_releases)
|
||||
releases: $(gz_releases) $(zip_releases) android
|
||||
|
||||
clean:
|
||||
rm *.syso -f
|
||||
|
||||
|
Before Width: | Height: | Size: 157 KiB After Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 148 KiB After Width: | Height: | Size: 116 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 778 KiB After Width: | Height: | Size: 1.5 MiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.7 MiB |
|
Before Width: | Height: | Size: 391 KiB After Width: | Height: | Size: 144 KiB |
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.7 MiB |
|
Before Width: | Height: | Size: 751 KiB After Width: | Height: | Size: 1.1 MiB |
@@ -109,17 +109,16 @@ func (s *httpTunnel) init() error {
|
||||
node := &config.ForwardNodeConfig{
|
||||
Name: s.opts.Name,
|
||||
Addr: s.opts.Endpoint,
|
||||
HTTP: &config.HTTPNodeConfig{},
|
||||
}
|
||||
if s.opts.Username != "" {
|
||||
node.Auth = &config.AuthConfig{
|
||||
node.HTTP.Auth = &config.AuthConfig{
|
||||
Username: s.opts.Username,
|
||||
Password: s.opts.Password,
|
||||
}
|
||||
}
|
||||
if s.opts.Hostname != "" {
|
||||
node.HTTP = &config.HTTPNodeConfig{
|
||||
Host: s.opts.Hostname,
|
||||
}
|
||||
node.HTTP.Host = s.opts.Hostname
|
||||
}
|
||||
if s.opts.EnableTLS {
|
||||
node.TLS = &config.TLSNodeConfig{}
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
package fonts
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
"fmt"
|
||||
|
||||
"gioui.org/font"
|
||||
"gioui.org/font/opentype"
|
||||
)
|
||||
|
||||
//go:embed NotoSansSC-Regular.ttf
|
||||
var fontNotoRegular []byte
|
||||
|
||||
//go:embed NotoSansSC-Bold.ttf
|
||||
var fontNotoBold []byte
|
||||
|
||||
var (
|
||||
collection []font.FontFace
|
||||
)
|
||||
|
||||
func init() {
|
||||
register(fontNotoRegular)
|
||||
register(fontNotoBold)
|
||||
}
|
||||
|
||||
func Collection() []font.FontFace {
|
||||
return collection
|
||||
}
|
||||
|
||||
func register(ttf []byte) {
|
||||
faces, err := opentype.ParseCollection(ttf)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("failed to parse font: %v", err))
|
||||
}
|
||||
collection = append(collection, faces[0])
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
package ui
|
||||
|
||||
import (
|
||||
"gioui.org/font/gofont"
|
||||
"gioui.org/layout"
|
||||
"gioui.org/text"
|
||||
"gioui.org/widget/material"
|
||||
"github.com/go-gost/gost.plus/config"
|
||||
"github.com/go-gost/gost.plus/ui/fonts"
|
||||
"github.com/go-gost/gost.plus/ui/i18n"
|
||||
"github.com/go-gost/gost.plus/ui/page"
|
||||
"github.com/go-gost/gost.plus/ui/page/entrypoint"
|
||||
@@ -40,8 +40,7 @@ func NewUI() *UI {
|
||||
}
|
||||
|
||||
th := material.NewTheme()
|
||||
// th.Shaper = text.NewShaper(text.WithCollection(gofont.Collection()))
|
||||
th.Shaper = text.NewShaper(text.WithCollection(fonts.Collection()))
|
||||
th.Shaper = text.NewShaper(text.WithCollection(gofont.Collection()))
|
||||
th.Palette = theme.Current().Material
|
||||
|
||||
router := page.NewRouter(th)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
package version
|
||||
|
||||
var Version = "0.3.0"
|
||||
var Version = "0.3.1"
|
||||
|
||||