Commit 74659324 authored by ginuerzh's avatar ginuerzh

update snapcraft build

parent cc871182
...@@ -32,4 +32,3 @@ _testmain.go ...@@ -32,4 +32,3 @@ _testmain.go
.vscode/ .vscode/
cmd/gost/gost cmd/gost/gost
snap
...@@ -22,7 +22,7 @@ require ( ...@@ -22,7 +22,7 @@ require (
github.com/shadowsocks/go-shadowsocks2 v0.1.5 github.com/shadowsocks/go-shadowsocks2 v0.1.5
github.com/shadowsocks/shadowsocks-go v0.0.0-20200409064450-3e585ff90601 github.com/shadowsocks/shadowsocks-go v0.0.0-20200409064450-3e585ff90601
github.com/songgao/water v0.0.0-20200317203138-2b4b6d7c09d8 github.com/songgao/water v0.0.0-20200317203138-2b4b6d7c09d8
github.com/xtaci/kcp-go v5.4.20+incompatible github.com/xtaci/kcp-go/v5 v5.6.1
github.com/xtaci/smux v1.5.16 github.com/xtaci/smux v1.5.16
github.com/xtaci/tcpraw v1.2.25 github.com/xtaci/tcpraw v1.2.25
gitlab.com/yawning/obfs4.git v0.0.0-20210511220700-e330d1b7024b gitlab.com/yawning/obfs4.git v0.0.0-20210511220700-e330d1b7024b
...@@ -47,8 +47,8 @@ require ( ...@@ -47,8 +47,8 @@ require (
github.com/onsi/ginkgo v1.16.5 // indirect github.com/onsi/ginkgo v1.16.5 // indirect
github.com/pkg/errors v0.9.1 // indirect github.com/pkg/errors v0.9.1 // indirect
github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 // indirect github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 // indirect
github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161 // indirect github.com/templexxx/cpu v0.0.7 // indirect
github.com/templexxx/xor v0.0.0-20191217153810-f85b25db303b // indirect github.com/templexxx/xorsimd v0.4.1 // indirect
github.com/tjfoc/gmsm v1.4.1 // indirect github.com/tjfoc/gmsm v1.4.1 // indirect
github.com/xtaci/lossyconn v0.0.0-20200209145036-adba10fffc37 // indirect github.com/xtaci/lossyconn v0.0.0-20200209145036-adba10fffc37 // indirect
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
......
This diff is collapsed.
gost.png

41.3 KB

...@@ -15,9 +15,9 @@ import ( ...@@ -15,9 +15,9 @@ import (
"github.com/go-log/log" "github.com/go-log/log"
"github.com/klauspost/compress/snappy" "github.com/klauspost/compress/snappy"
"github.com/xtaci/tcpraw" "github.com/xtaci/kcp-go/v5"
"github.com/xtaci/kcp-go"
"github.com/xtaci/smux" "github.com/xtaci/smux"
"github.com/xtaci/tcpraw"
) )
var ( var (
......
//go:build !windows
// +build !windows // +build !windows
package gost package gost
...@@ -8,7 +9,7 @@ import ( ...@@ -8,7 +9,7 @@ import (
"syscall" "syscall"
"github.com/go-log/log" "github.com/go-log/log"
"github.com/xtaci/kcp-go" "github.com/xtaci/kcp-go/v5"
) )
func kcpSigHandler() { func kcpSigHandler() {
......
name: gost name: gost
type: app base: core20
version: '2.11.2' version: '2.11.2'
title: GO Simple Tunnel
summary: A simple security tunnel written in golang summary: A simple security tunnel written in golang
description: | description: |
https://github.com/ginuerzh/gost Project: https://github.com/ginuerzh/gost
Wiki: https://v2.gost.run
icon: gost.png
confinement: strict confinement: strict
grade: stable grade: stable
base: core18
license: MIT
parts: parts:
gost: gost:
plugin: nil plugin: go
build-snaps: [go/1.18/stable] go-channel: latest/stable
source: https://github.com/ginuerzh/gost.git source: https://github.com/ginuerzh/gost
source-subdir: cmd/gost source-subdir: cmd/gost
source-type: git source-type: git
source-branch: '2' source-tag: v2.11.2
build-packages: build-packages:
- build-essential - gcc
override-build: |
set -ex
echo "Starting override-build:"
pwd
cd $SNAPCRAFT_PART_BUILD
GO111MODULE=on CGO_ENABLED=0 go build --ldflags="-s -w"
./gost -V
echo "Installing to ${SNAPCRAFT_PART_INSTALL}..."
install -d $SNAPCRAFT_PART_INSTALL/bin
cp -v gost $SNAPCRAFT_PART_INSTALL/bin/
echo "Override-build done!"
apps: apps:
gost: gost:
command: bin/gost command: bin/gost
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment