Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

【赛风三(Psiphon3) 】Installation of go language on 🚩🇨🇳🏹红旗中科 RedFlag Linux (🍥Debian 11) #3

Open
englianhu opened this issue Sep 3, 2022 · 4 comments

Comments

@englianhu
Copy link
Contributor

englianhu commented Sep 3, 2022

go

## 方案 01
echo "export PATH=/usr/lib/go/bin:${PATH}" | sudo tee /etc/profile.d/go.sh
source /etc/profile.d/go.sh
go version

## 方案 02
echo "export PATH=/usr/lib/go/bin:${PATH}" | sudo tee -a $HOME/.profile source
source $HOME/.profile
go version

参考文献:How to Install Go (Golang) Compiler on Debian 11

Originally posted by @englianhu in scibrokes/setup-centOS7-DO#4 (comment)

scibrokes/setup-centOS7-DO#4
scibrokes/owner#4
thispc/psiphon#38

@englianhu englianhu changed the title 赛风三(Psiphon3) 【赛风三(Psiphon3) 】Installation of go language on 🚩🇨🇳🏹红旗中科 RedFlag Linux (🍥Debian 11) Sep 4, 2022
@englianhu englianhu reopened this Sep 4, 2022
@englianhu
Copy link
Contributor Author

englianhu commented Sep 4, 2022

To execute a binary or .run file in Linux from the shell, use the dot forward slash friend

 ./binary_file_name

and if it fails say because of permissions, you could try this before executing it

 chmod +x binary_file_name
 # then execute it
 ./binary_file_name

引用:How to run binary file in Linux

The man page of chmod covers that.

u stands for user.
g stands for group.
o stands for others.
a stands for all.
That means that chmod u+x somefile will grant only the owner of that file execution permissions whereas chmod +x somefile is the same as chmod a+x somefile.

引用:chmod u+x versus chmod +x

Generate configuration data

Run the "generate" mode of psiphond to generate configs, setting the IP address as appropriate; this is the address the client will use to connect to the server.

$ ./psiphond -ipaddress 127.0.0.1 -protocol OSSH:9999 -protocol generate

$ ls
psiphond
psiphond.config
psiphond-osl.config
psiphond-tactics.config
psiphond-traffic-rules.config
server-entry.dat

Create a client config file, copying the contents of server-entry.dat to the TargetServerEntry field.

$ cat server-entry.dat 
3132372e302e302e31202020207b22746167223a22222c2269[...]

$ cat client.config
{
    "LocalHttpProxyPort" : 8080,
    "LocalSocksProxyPort" : 1080,

    "PropagationChannelId" : "24BCA4EE20BEB92C",
    "SponsorId" : "721AE60D76700F5A",

    "TargetServerEntry" : "3132372e302e302e31202020207b22746167223a22222c2269[...]"
}

Run psiphond

$ ./psiphond run
{"localAddress":"127.0.0.1:9999","msg":"listening","tunnelProtocol":"OSSH",[...]}
{"localAddress":"127.0.0.1:9999","msg":"running","tunnelProtocol":"OSSH",[...]}
[...]

Run the console client

```r
$ ./ConsoleClient -config ./client.config
{"data":{"port":1080},"noticeType":"ListeningSocksProxyPort",[...]}
{"data":{"port":8080},"noticeType":"ListeningHttpProxyPort",[...]}
[...]
{"data":{"count":1},"noticeType":"Tunnels",[...]}

Tunnel traffic through Psiphon

Use the local SOCKS proxy (port 1080) or HTTP proxy (port 8080) to tunnel traffic.

引用:https://github.com/englianhu/psiphon-tunnel-core


:~$ wget https://github.com/Psiphon-Labs/psiphon-tunnel-core-binaries/blob/master/psiphond/psiphond
:~$ sudo chmod a+x psiphond
:~$ sudo ./psiphond -ipaddress 127.0.0.1 -protocol OSSH:9999 -protocol generate
Usage:

./psiphond <flags> generate    generates configuration files
./psiphond <flags> run         runs configured services

  -config filename
        run or generate with this config filename (default "psiphond.config")
  -interface network-interface
        generate with server IP address from this network-interface
  -ipaddress IP address
        generate with this server IP address (default "127.0.0.1")
  -logFilename string
        set application log file name and path; blank for stderr
  -obfs4-distBias
        Enable obfs4 using ScrambleSuit style table generation
  -osl filename
        generate with this OSL config filename (default "psiphond-osl.config")
  -protocol protocol:port
        generate with protocol:port; flag may be repeated to enable multiple protocols
  -serverEntry filename
        generate with this server entry filename (default "server-entry.dat")
  -tactics filename
        generate with this tactics config filename (default "psiphond-tactics.config")
  -trafficRules filename
        generate with this traffic rules config filename (default "psiphond-traffic-rules.config")
  -web port
        generate with web server port; 0 for no web server
:~$ sudo ./psiphond run
error loading configuration file: open psiphond.config: no such file or directory

参考文献:

@englianhu
Copy link
Contributor Author

englianhu commented Sep 4, 2022

$ ./psiphond -ipaddress 127.0.0.1 -protocol OSSH:9999 -protocol generate

$ ls
psiphond
psiphond.config
psiphond-osl.config
psiphond-tactics.config
psiphond-traffic-rules.config
server-entry.dat

Originally posted by @englianhu in #3 (comment)

并无产生以上文件。

$ git clone https://github.com/englianhu/psiphon-tunnel-core-binaries.git
$ cd /home/englianhu/文档/GitHub/psiphon-tunnel-core-binaries/linux #psiphon-tunnel-core-x86_64
$ sudo chmod a+x psiphon-tunnel-core-x86_64
$ sudo ./psiphon-tunnel-core-x86_64
{"data":{"message":"configuration file is required"},"noticeType":"Error","timestamp":"2022-09-04T13:55:00.724Z"}

参考:https://github.com/englianhu/psiphon-tunnel-core-binaries

$ git clone https://github.com/scibrokes/mytools.git
$ cd /home/englianhu/文档/GitHub/mytools/
$ sudo chmod a+x flyvpn
$ sudo chmod a+x phantomjs
$ sudo chmod a+x psiphond

@englianhu
Copy link
Contributor Author

englianhu commented Sep 4, 2022

$ git clone https://github.com/englianhu/Psiphon3-for-Linux.git
$ cd /home/englianhu/文档/GitHub/Psiphon3-for-Linux/openssh-5.9p1/
$ sudo chmod a+x install-sh
$ ./install-sh
install:        no input file specified

参考:https://github.com/englianhu/Psiphon3-for-Linux

@englianhu
Copy link
Contributor Author

无名浏览器

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant