Skip to content

Commit

Permalink
替换clashr为clash字段
Browse files Browse the repository at this point in the history
  • Loading branch information
Newman committed Nov 4, 2019
1 parent 397c7eb commit 8d83a82
Show file tree
Hide file tree
Showing 69 changed files with 172 additions and 175 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ deploy:
file: bin/*
file_glob: true
on:
repo: whojave/clashr
repo: whojave/clash
branch: master
tags: true
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
NAME=clashR
NAME=clash
BINDIR=bin
VERSION=$(shell git describe --tags || echo "unknown version")
BUILDTIME=$(shell date -u)
GOBUILD=CGO_ENABLED=0 go build -ldflags '-X "github.com/whojave/clashr/constant.Version=$(VERSION)" \
-X "github.com/whojave/clashr/constant.BuildTime=$(BUILDTIME)" \
GOBUILD=CGO_ENABLED=0 go build -ldflags '-X "github.com/whojave/clash/constant.Version=$(VERSION)" \
-X "github.com/whojave/clash/constant.BuildTime=$(BUILDTIME)" \
-w -s'

PLATFORM_LIST = \
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<h1 align="center">
<img src="https://github.com/whojave/clashr/raw/master/docs/logo.png" alt="Clash" width="200">
<img src="https://github.com/whojave/clash/raw/master/docs/logo.png" alt="Clash" width="200">
<br>Clash<br>
</h1>

<h4 align="center">A rule-based tunnel in Go.</h4>

<p align="center">
<a href="https://travis-ci.org/whojave/clashr">
<img src="https://img.shields.io/travis/whojave/clashr.svg?style=flat-square"
<a href="https://travis-ci.org/whojave/clash">
<img src="https://img.shields.io/travis/whojave/clash.svg?style=flat-square"
alt="Travis-CI">
</a>
<a href="https://goreportcard.com/report/github.com/whojave/clashr">
<img src="https://goreportcard.com/badge/github.com/whojave/clashr?style=flat-square">
<a href="https://goreportcard.com/report/github.com/whojave/clash">
<img src="https://goreportcard.com/badge/github.com/whojave/clash?style=flat-square">
</a>
<a href="https://github.com/whojave/clashr/releases">
<img src="https://img.shields.io/github/release/whojave/clashr/all.svg?style=flat-square">
<a href="https://github.com/whojave/clash/releases">
<img src="https://img.shields.io/github/release/whojave/clash/all.svg?style=flat-square">
</a>
</p>

Expand All @@ -32,10 +32,10 @@
Clash Requires Go >= 1.13. You can build it from source:

```sh
$ go get -u -v github.com/whojave/clashr
$ go get -u -v github.com/whojave/clash
```

Pre-built binaries are available here: [release](https://github.com/whojave/clashr/releases)
Pre-built binaries are available here: [release](https://github.com/whojave/clash/releases)

Check Clash version with:

Expand All @@ -57,7 +57,7 @@ $ pm2 start clash

If you have Docker installed, you can run clash directly using `docker-compose`.

[Run clash in docker](https://github.com/whojave/clashr/wiki/Run-clash-in-docker)
[Run clash in docker](https://github.com/whojave/clash/wiki/Run-clash-in-docker)

## Config

Expand Down
2 changes: 1 addition & 1 deletion adapters/inbound/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http"
"strings"

C "github.com/whojave/clashr/constant"
C "github.com/whojave/clash/constant"
)

// HTTPAdapter is a adapter for HTTP connection
Expand Down
2 changes: 1 addition & 1 deletion adapters/inbound/https.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"net"
"net/http"

C "github.com/whojave/clashr/constant"
C "github.com/whojave/clash/constant"
)

// NewHTTPS is HTTPAdapter generator
Expand Down
4 changes: 2 additions & 2 deletions adapters/inbound/socket.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package adapters
import (
"net"

"github.com/whojave/clashr/component/socks5"
C "github.com/whojave/clashr/constant"
"github.com/whojave/clash/component/socks5"
C "github.com/whojave/clash/constant"
)

// SocketAdapter is a adapter for socks and redir connection
Expand Down
4 changes: 2 additions & 2 deletions adapters/inbound/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"net/http"
"strconv"

"github.com/whojave/clashr/component/socks5"
C "github.com/whojave/clashr/constant"
"github.com/whojave/clash/component/socks5"
C "github.com/whojave/clash/constant"
)

func parseSocksAddr(target socks5.Addr) *C.Metadata {
Expand Down
4 changes: 2 additions & 2 deletions adapters/outbound/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"net/http"
"time"

"github.com/whojave/clashr/common/queue"
C "github.com/whojave/clashr/constant"
"github.com/whojave/clash/common/queue"
C "github.com/whojave/clash/constant"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion adapters/outbound/direct.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"net"

C "github.com/whojave/clashr/constant"
C "github.com/whojave/clash/constant"
)

type Direct struct {
Expand Down
4 changes: 2 additions & 2 deletions adapters/outbound/fallback.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"time"


C "github.com/whojave/clashr/constant"
"github.com/whojave/clashr/common/picker"
C "github.com/whojave/clash/constant"
"github.com/whojave/clash/common/picker"
)

type Fallback struct {
Expand Down
2 changes: 1 addition & 1 deletion adapters/outbound/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"net/http"
"strconv"

C "github.com/whojave/clashr/constant"
C "github.com/whojave/clash/constant"
)

type Http struct {
Expand Down
4 changes: 2 additions & 2 deletions adapters/outbound/loadbalance.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"sync"
"time"

"github.com/whojave/clashr/common/murmur3"
C "github.com/whojave/clashr/constant"
"github.com/whojave/clash/common/murmur3"
C "github.com/whojave/clash/constant"

"golang.org/x/net/publicsuffix"
)
Expand Down
2 changes: 1 addition & 1 deletion adapters/outbound/reject.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net"
"time"

C "github.com/whojave/clashr/constant"
C "github.com/whojave/clash/constant"
)

type Reject struct {
Expand Down
2 changes: 1 addition & 1 deletion adapters/outbound/selector.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"errors"
"net"

C "github.com/whojave/clashr/constant"
C "github.com/whojave/clash/constant"
)

type Selector struct {
Expand Down
10 changes: 5 additions & 5 deletions adapters/outbound/shadowsocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
"net"
"strconv"

"github.com/whojave/clashr/common/structure"
obfs "github.com/whojave/clashr/component/simple-obfs"
"github.com/whojave/clashr/component/socks5"
v2rayObfs "github.com/whojave/clashr/component/v2ray-plugin"
C "github.com/whojave/clashr/constant"
"github.com/whojave/clash/common/structure"
obfs "github.com/whojave/clash/component/simple-obfs"
"github.com/whojave/clash/component/socks5"
v2rayObfs "github.com/whojave/clash/component/v2ray-plugin"
C "github.com/whojave/clash/constant"

"github.com/Dreamacro/go-shadowsocks2/core"
)
Expand Down
2 changes: 1 addition & 1 deletion adapters/outbound/shadowsocksr.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"encoding/json"
"errors"
C "github.com/whojave/clashr/constant"
C "github.com/whojave/clash/constant"
"github.com/whojave/gossr/obfs"
"github.com/whojave/gossr/protocol"
"net"
Expand Down
8 changes: 4 additions & 4 deletions adapters/outbound/snell.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"net"
"strconv"

"github.com/whojave/clashr/common/structure"
obfs "github.com/whojave/clashr/component/simple-obfs"
"github.com/whojave/clashr/component/snell"
C "github.com/whojave/clashr/constant"
"github.com/whojave/clash/common/structure"
obfs "github.com/whojave/clash/component/simple-obfs"
"github.com/whojave/clash/component/snell"
C "github.com/whojave/clash/constant"
)

type Snell struct {
Expand Down
4 changes: 2 additions & 2 deletions adapters/outbound/socks5.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"net"
"strconv"

"github.com/whojave/clashr/component/socks5"
C "github.com/whojave/clashr/constant"
"github.com/whojave/clash/component/socks5"
C "github.com/whojave/clash/constant"
)

type Socks5 struct {
Expand Down
4 changes: 2 additions & 2 deletions adapters/outbound/urltest.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"sync/atomic"
"time"

"github.com/whojave/clashr/common/picker"
C "github.com/whojave/clashr/constant"
"github.com/whojave/clash/common/picker"
C "github.com/whojave/clash/constant"
)

type URLTest struct {
Expand Down
6 changes: 3 additions & 3 deletions adapters/outbound/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"sync"
"time"

"github.com/whojave/clashr/component/socks5"
C "github.com/whojave/clashr/constant"
"github.com/whojave/clashr/dns"
"github.com/whojave/clash/component/socks5"
C "github.com/whojave/clash/constant"
"github.com/whojave/clash/dns"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions adapters/outbound/vmess.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strconv"
"strings"

"github.com/whojave/clashr/component/vmess"
C "github.com/whojave/clashr/constant"
"github.com/whojave/clash/component/vmess"
C "github.com/whojave/clash/constant"
)

type Vmess struct {
Expand Down
22 changes: 11 additions & 11 deletions build4android/build.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#!/bin/bash
#
# Build:
# - git clone -b dev https://github.com/whojave/clashr
# - cd clashr
# - git clone -b dev https://github.com/whojave/clash
# - cd clash
# - ANDROID_NDK=/path/to/android/ndk /path/to/this/script
#

export ANDROID_NDK=/home/king/Android/Sdk/ndk/20.0.5594570
# export GOPATH=/usr/lib/go

NAME=clashr
NAME=clash
BINDIR=bin
VERSION=$(git describe --tags || echo "unknown version")
BUILDTIME=$(LANG=C date -u)
Expand All @@ -24,8 +24,8 @@ export CXX=$ANDROID_CXX
export CC=$ANDROID_CC
export LD=$ANDROID_LD
export CGO_ENABLED=1
go build -ldflags "-X \"github.com/whojave/clashr/constant.Version=$VERSION\" -X \"github.com/whojave/clashr/constant.BuildTime=$BUILDTIME\" -w -s" \
-o "build4android/clashr_arm64"
go build -ldflags "-X \"github.com/whojave/clash/constant.Version=$VERSION\" -X \"github.com/whojave/clash/constant.BuildTime=$BUILDTIME\" -w -s" \
-o "build4android/clash_arm64"


ANDROID_CC=$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi21-clang
Expand All @@ -37,8 +37,8 @@ export CXX=$ANDROID_CXX
export CC=$ANDROID_CC
export LD=$ANDROID_LD
export CGO_ENABLED=1
go build -ldflags "-X \"github.com/whojave/clashr/constant.Version=$VERSION\" -X \"github.com/whojave/clashr/constant.BuildTime=$BUILDTIME\" -w -s" \
-o "build4android/clashr_armv7a"
go build -ldflags "-X \"github.com/whojave/clash/constant.Version=$VERSION\" -X \"github.com/whojave/clash/constant.BuildTime=$BUILDTIME\" -w -s" \
-o "build4android/clash_armv7a"


ANDROID_CC=$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android21-clang
Expand All @@ -50,8 +50,8 @@ export CC=$ANDROID_CC
export LD=$ANDROID_LD
export CGO_ENABLED=1
export GOARCH=386
go build -ldflags "-X \"github.com/whojave/clashr/constant.Version=$VERSION\" -X \"github.com/whojave/clashr/constant.BuildTime=$BUILDTIME\" -w -s" \
-o "build4android/clashr_x86"
go build -ldflags "-X \"github.com/whojave/clash/constant.Version=$VERSION\" -X \"github.com/whojave/clash/constant.BuildTime=$BUILDTIME\" -w -s" \
-o "build4android/clash_x86"


ANDROID_CC=$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android21-clang
Expand All @@ -63,8 +63,8 @@ export CC=$ANDROID_CC
export LD=$ANDROID_LD
export CGO_ENABLED=1
export GOARCH=amd64
go build -ldflags "-X \"github.com/whojave/clashr/constant.Version=$VERSION\" -X \"github.com/whojave/clashr/constant.BuildTime=$BUILDTIME\" -w -s" \
-o "build4android/clashr_amd64"
go build -ldflags "-X \"github.com/whojave/clash/constant.Version=$VERSION\" -X \"github.com/whojave/clash/constant.BuildTime=$BUILDTIME\" -w -s" \
-o "build4android/clash_amd64"



2 changes: 1 addition & 1 deletion component/fakeip/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net"
"sync"

"github.com/whojave/clashr/common/cache"
"github.com/whojave/clash/common/cache"
)

// Pool is a implementation about fake ip generator without storage
Expand Down
2 changes: 1 addition & 1 deletion component/simple-obfs/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"net"
"net/http"

"github.com/whojave/clashr/common/pool"
"github.com/whojave/clash/common/pool"
)

// HTTPObfs is shadowsocks http simple-obfs implementation
Expand Down
2 changes: 1 addition & 1 deletion component/simple-obfs/tls.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net"
"time"

"github.com/whojave/clashr/common/pool"
"github.com/whojave/clash/common/pool"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion component/socks5/socks5.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net"
"strconv"

"github.com/whojave/clashr/component/auth"
"github.com/whojave/clash/component/auth"
)

// Error represents a SOCKS error
Expand Down
2 changes: 1 addition & 1 deletion component/v2ray-plugin/websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net"
"net/http"

"github.com/whojave/clashr/component/vmess"
"github.com/whojave/clash/component/vmess"
)

// Option is options of websocket obfs
Expand Down
2 changes: 1 addition & 1 deletion component/vmess/aead.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"errors"
"io"

"github.com/whojave/clashr/common/pool"
"github.com/whojave/clash/common/pool"
)

type aeadWriter struct {
Expand Down
2 changes: 1 addition & 1 deletion component/vmess/chunk.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"errors"
"io"

"github.com/whojave/clashr/common/pool"
"github.com/whojave/clash/common/pool"
)

const (
Expand Down
Loading

0 comments on commit 8d83a82

Please sign in to comment.