Merge branch 'trunk' into logging
This commit is contained in:
commit
2edaff73b5
|
@ -0,0 +1,84 @@
|
|||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: fetch
|
||||
image: golang
|
||||
volumes:
|
||||
- name: deps
|
||||
path: /go
|
||||
when:
|
||||
repo: flutter/libcwtch-go
|
||||
branch: trunk
|
||||
event: [ push, pull_request ]
|
||||
commands:
|
||||
- wget https://git.openprivacy.ca/openprivacy/buildfiles/raw/master/tor/tor
|
||||
- wget https://git.openprivacy.ca/openprivacy/buildfiles/raw/master/tor/torrc
|
||||
- chmod a+x tor
|
||||
- go get -u golang.org/x/lint/golint
|
||||
#- export GO111MODULE=on
|
||||
#- go mod vendor
|
||||
- go get
|
||||
# TODO: upgrade to go1.16, remove mod/vendor, add go install for 1.16
|
||||
# go vendor so packages aren't refetched each new stage which loses this working dir, or restructure workspace to include pkg
|
||||
- name: quality
|
||||
image: golang
|
||||
volumes:
|
||||
- name: deps
|
||||
path: /go
|
||||
when:
|
||||
repo: flutter/libcwtch-go
|
||||
branch: trunk
|
||||
event: [ push, pull_request ]
|
||||
commands:
|
||||
- go list ./... | xargs go vet
|
||||
- go list ./... | xargs golint
|
||||
#Todo: fix all the lint errors and add `-set_exit_status` above to enforce linting
|
||||
- name: build-linux
|
||||
image: openpriv/android-go-mobile:2021
|
||||
volumes:
|
||||
- name: deps
|
||||
path: /go
|
||||
when:
|
||||
repo: flutter/libcwtch-go
|
||||
branch: trunk
|
||||
event: [ push, pull_request ]
|
||||
commands:
|
||||
- make linux
|
||||
- name: build-android
|
||||
image: openpriv/android-go-mobile:2021
|
||||
volumes:
|
||||
- name: deps
|
||||
path: /go
|
||||
when:
|
||||
repo: flutter/libcwtch-go
|
||||
branch: trunk
|
||||
event: [ push, pull_request ]
|
||||
commands:
|
||||
- make android
|
||||
- name: notify-email
|
||||
image: drillster/drone-email
|
||||
host: build.openprivacy.ca
|
||||
port: 25
|
||||
skip_verify: true
|
||||
from: drone@openprivacy.ca
|
||||
when:
|
||||
repo: flutter/libcwtch-go
|
||||
branch: trunk
|
||||
event: [ push, pull_request ]
|
||||
status: [ failure ]
|
||||
- name: notify-gogs
|
||||
image: openpriv/drone-gogs
|
||||
when:
|
||||
repo: flutter/libcwtch-go
|
||||
branch: trunk
|
||||
event: pull_request
|
||||
status: [ success, changed, failure ]
|
||||
secrets: [gogs_account_token]
|
||||
gogs_url: https://git.openprivacy.ca
|
||||
|
||||
volumes:
|
||||
- name: deps
|
||||
temp: {}
|
2
lib.go
2
lib.go
|
@ -60,7 +60,7 @@ func StartCwtch(appDir string, torPath string) {
|
|||
log.Infof("making directory %v", appDir)
|
||||
os.MkdirAll(path.Join(appDir, "/.tor", "tor"), 0700)
|
||||
tor.NewTorrc().WithSocksPort(port).WithOnionTrafficOnly().WithControlPort(controlPort).WithHashedPassword(base64.StdEncoding.EncodeToString(key)).Build(filepath.Join(appDir, ".tor", "tor", "torrc"))
|
||||
acn, err := tor.NewTorACNWithAuth(path.Join(appDir, "/.tor"), torPath, controlPort, tor.HashedPasswordAuthenticator{base64.StdEncoding.EncodeToString(key)})
|
||||
acn, err := tor.NewTorACNWithAuth(path.Join(appDir, "/.tor"), torPath, controlPort, tor.HashedPasswordAuthenticator{Password: base64.StdEncoding.EncodeToString(key)})
|
||||
if err != nil {
|
||||
log.Errorf("\nError connecting to Tor: %v\n", err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue