Convert process.Creator

This commit is contained in:
idk
2022-01-04 17:25:10 -05:00
parent 5c8731e6c4
commit 2b6e5f6fb0
2 changed files with 30 additions and 4 deletions

View File

@ -29,4 +29,21 @@ or
git clone https://github.com/ipsn/go-libtor $GOPATH/src/github.com/ipsn/go-libtor
```
Then, clone the repository into your
Then, clone the repository into your `GOPATH`
```bash
GO111MODULE=off go get -u i2pgit.org/idk/torclientapp
```
or
```bash
git clone https://i2pgit.org/idk/torclientapp $GOPATH/src/i2pgit.org/idk/torclientapp
```
Finally, change to the repository directory and run `make`.
```bash
cd $GOPATH/src/i2pgit.org/idk/torclientapp
make
```

View File

@ -6,7 +6,9 @@ import (
"os"
"path/filepath"
"github.com/cretz/bine/process"
"github.com/cretz/bine/tor"
"github.com/ipsn/go-libtor"
"i2pgit.org/idk/clientapp"
// "path/filepath"
@ -26,10 +28,17 @@ type TorClientApp struct {
var wd, err = os.Getwd()
func ProcessCreator() process.Creator {
var creator process.Creator
creator = libtor.Creator
return creator
}
var StartConf = &tor.StartConf{
DataDir: filepath.Join(wd, "tor-clientapp"),
ControlPort: 9051,
DebugWriter: os.Stderr,
DataDir: filepath.Join(wd, "tor-clientapp"),
ControlPort: 9051,
ProcessCreator: ProcessCreator(),
DebugWriter: os.Stderr,
}
func (e *TorClientApp) tor() (*tor.Tor, error) {