Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
aztecrabbit committed Jan 27, 2020
1 parent 032c9bc commit 84a220f
Show file tree
Hide file tree
Showing 4 changed files with 163 additions and 4 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 Aztec Rabbit

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
136 changes: 136 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
# Brainfuck Tunnel - Psiphon Pro Go Version

...


Requirements
------------

**Linux**

golang
redsocks

**Windows**

golang
proxifier


Install
-------

**Brainfuck Psiphon Pro Go**

$ go get -v -u github.com/aztecrabbit/brainfuck-psiphon-pro-go

$ cd ~/go/src/github.com/aztecrabbit/brainfuck-psiphon-pro-go
$ go build -ldflags "-s -w"

**Psiphon Tunnel Core**

$ go get -v -u github.com/Psiphon-Labs/psiphon-tunnel-core/ConsoleClient

$ cd ~/go/src/github.com/Psiphon-Labs/psiphon-tunnel-core/ConsoleClient
$ go build -ldflags "-s -w" -o ~/go/src/github.com/aztecrabbit/brainfuck-psiphon-pro-go/psiphon-tunnel-core


Usage
-----

**Linux**

$ cd ~/go/src/github.com/aztecrabbit/brainfuck-psiphon-pro-go
$ sudo ./brainfuck-psiphon-pro-go

or

$ sudo ~/go/src/github.com/aztecrabbit/brainfuck-psiphon-pro-go/brainfuck-psiphon-pro-go


**Termux**

$ cd ~/go/src/github.com/aztecrabbit/brainfuck-psiphon-pro-go
$ ./brainfuck-psiphon-pro-go

or

$ ~/go/src/github.com/aztecrabbit/brainfuck-psiphon-pro-go/brainfuck-psiphon-pro-go


Configurations
--------------

Run `./brainfuck-psiphon-pro-go` first to export all default settings.


#### Pro Version

...
"PsiphonCore": 1,
"Psiphon": {
"CoreName": "psiphon-tunnel-core",
"Tunnel": 3,
"Region": "SG",
"Protocols": [
"FRONTED-MEEK-HTTP-OSSH",
"FRONTED-MEEK-OSSH"
],
"TunnelWorkers": 8,
"KuotaDataLimit": 0,
"Authorizations": [
"blablabla"
]
}
...


#### Rules

**Xl Iflix or Axis Gaming (Default)**

...
"Rules": {
"akamai.net:80": [
"video.iflix.com",
"videocdn-2.iflix.com",
"iflix-videocdn-p1.akamaized.net",
"iflix-videocdn-p2.akamaized.net",
"iflix-videocdn-p3.akamaized.net",
"iflix-videocdn-p6.akamaized.net",
"iflix-videocdn-p7.akamaized.net",
"iflix-videocdn-p8.akamaized.net"
]
},
...

**Direct**

...
"Rules": {
"*:*": [
"*"
]
},
...

**Xl King**

...
"Rules": {
"akamai.net:80": [
"www.pubgmobile.com"
]
},
...

**Telkomsel 0P0K**

...
"Rules": {
"akamai.net:443": [
"118.97.159.51:443",
"118.98.95.106:443"
]
},
...
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,13 @@ func main() {

for i := 1; i <= config.PsiphonCore; i++ {
Psiphon := new(libpsiphon.Psiphon)
Psiphon.ProxyRotator = ProxyRotator
Psiphon.Config = config.Psiphon
Psiphon.ProxyPort = Inject.Config.Port
Psiphon.KuotaData = libpsiphon.DefaultKuotaData
Psiphon.ListenPort = libutils.Atoi(ProxyRotator.Config.Port) + i

go Psiphon.Start(ProxyRotator)
go Psiphon.Start()
}

InterruptHandler.Wait()
Expand Down
7 changes: 4 additions & 3 deletions src/libpsiphon/libpsiphon.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ type Data struct {
}

type Psiphon struct {
ProxyRotator *libproxyrotator.ProxyRotator
Config *Config
ProxyPort string
KuotaData *KuotaData
Expand Down Expand Up @@ -107,7 +108,7 @@ func (p *Psiphon) CheckKuotaDataLimit(sent float64, received float64) bool {
return true
}

func (p *Psiphon) Start(proxyrotator *libproxyrotator.ProxyRotator) {
func (p *Psiphon) Start() {
PsiphonData := &Data{
UpstreamProxyURL: "http://127.0.0.1:" + p.ProxyPort,
DataStoreDirectory: PsiphonDirectory + "/data/" + strconv.Itoa(p.ListenPort),
Expand Down Expand Up @@ -182,7 +183,7 @@ func (p *Psiphon) Start(proxyrotator *libproxyrotator.ProxyRotator) {
)

} else if noticeType == "ActiveTunnel" {
proxyrotator.Proxies = append(proxyrotator.Proxies, "0.0.0.0:" + strconv.Itoa(p.ListenPort))
p.ProxyRotator.Proxies = append(p.ProxyRotator.Proxies, "0.0.0.0:" + strconv.Itoa(p.ListenPort))
p.TunnelConnected++
if p.Config.Tunnel > 1 {
diagnosticId := line["data"].(map[string]interface{})["diagnosticID"].(string)
Expand Down Expand Up @@ -254,7 +255,7 @@ func (p *Psiphon) Start(proxyrotator *libproxyrotator.ProxyRotator) {
command.Start()
command.Wait()

proxyrotator.DeleteProxy("0.0.0.0:" + strconv.Itoa(p.ListenPort))
p.ProxyRotator.DeleteProxy("0.0.0.0:" + strconv.Itoa(p.ListenPort))

time.Sleep(200 * time.Millisecond)

Expand Down

0 comments on commit 84a220f

Please sign in to comment.