Convert process.Creator
This commit is contained in:
19
README.md
19
README.md
@ -29,4 +29,21 @@ or
|
|||||||
git clone https://github.com/ipsn/go-libtor $GOPATH/src/github.com/ipsn/go-libtor
|
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
|
||||||
|
```
|
||||||
|
15
clientapp.go
15
clientapp.go
@ -6,7 +6,9 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
|
"github.com/cretz/bine/process"
|
||||||
"github.com/cretz/bine/tor"
|
"github.com/cretz/bine/tor"
|
||||||
|
"github.com/ipsn/go-libtor"
|
||||||
|
|
||||||
"i2pgit.org/idk/clientapp"
|
"i2pgit.org/idk/clientapp"
|
||||||
// "path/filepath"
|
// "path/filepath"
|
||||||
@ -26,10 +28,17 @@ type TorClientApp struct {
|
|||||||
|
|
||||||
var wd, err = os.Getwd()
|
var wd, err = os.Getwd()
|
||||||
|
|
||||||
|
func ProcessCreator() process.Creator {
|
||||||
|
var creator process.Creator
|
||||||
|
creator = libtor.Creator
|
||||||
|
return creator
|
||||||
|
}
|
||||||
|
|
||||||
var StartConf = &tor.StartConf{
|
var StartConf = &tor.StartConf{
|
||||||
DataDir: filepath.Join(wd, "tor-clientapp"),
|
DataDir: filepath.Join(wd, "tor-clientapp"),
|
||||||
ControlPort: 9051,
|
ControlPort: 9051,
|
||||||
DebugWriter: os.Stderr,
|
ProcessCreator: ProcessCreator(),
|
||||||
|
DebugWriter: os.Stderr,
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *TorClientApp) tor() (*tor.Tor, error) {
|
func (e *TorClientApp) tor() (*tor.Tor, error) {
|
||||||
|
Reference in New Issue
Block a user