summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2022-06-23 00:31:49 +0200
committercyBerta <cyberta@riseup.net>2022-06-23 00:31:49 +0200
commitd9aabb980b83e5f3622a3fd9ab19cc4b51104899 (patch)
treefd9a4aa3c1b6b6fdbb6377ef5fafbd86c3608aae /client
parentbb56d405ba531b447efa194e26e8218ab3f4a689 (diff)
remove mutex, handle thread safety outside
Diffstat (limited to 'client')
-rw-r--r--client/client.go7
1 files changed, 0 insertions, 7 deletions
diff --git a/client/client.go b/client/client.go
index 482f66f..9263aac 100644
--- a/client/client.go
+++ b/client/client.go
@@ -1,6 +1,5 @@
// Package client exposes a socks5 proxy that uses obfs4 to communicate with the server,
// with an optional kcp wire transport.
-
package client
import (
@@ -8,7 +7,6 @@ import (
"fmt"
"log"
"net"
- "sync"
"0xacab.org/leap/obfsvpn"
@@ -27,7 +25,6 @@ type Client struct {
obfs4Cert string
server *socks5.Server
started bool
- mu sync.Mutex
}
func NewClient(kcp bool, socksAddr, obfs4Cert string) *Client {
@@ -39,8 +36,6 @@ func NewClient(kcp bool, socksAddr, obfs4Cert string) *Client {
}
func (c *Client) Start() (bool, error) {
- c.mu.Lock()
- defer c.mu.Unlock()
if c.started {
log.Printf("Cannot start proxy server, already running")
@@ -78,8 +73,6 @@ func (c *Client) Start() (bool, error) {
}
func (c *Client) Stop() (bool, error) {
- c.mu.Lock()
- defer c.mu.Unlock()
if !c.started || c.server == nil {
return false, ErrNotRunning