Server proksi SOCKS V5 sederhana.
Gunakan make
untuk menyelesaikan kompilasi dan penautan.
$ make
Jika diikuti dengan CFLAG=-DDEBUG
mode debugging diaktifkan:
$ make CFLAG=-DDEBUG
Jika dimulai tanpa opsi apa pun, ia akan mendengarkan pada port 1080 dan tidak diperlukan otentikasi.
$ ./server
NO AUTHENTICATION REQUIRED
Listening at 0.0.0.0:1080
Dengan opsi -h
, informasi bantuan ditampilkan.
$ ./server -h
usage: ./server [options]
options:
-a < address > Local Address to bind (default: 0.0.0.0).
-p < port > Port number to bind (default: 1080).
-u < path/to/passwd > The path to passwd.
-d Run as a daemon.
-h Show this help message.
Opsi -a
dan -p
digunakan untuk menentukan alamat IP dan nomor port yang terikat ke server masing-masing.
$ ./server -a 127.0.0.1 -p 8080
NO AUTHENTICATION REQUIRED
Listening at 127.0.0.1:8080
Opsi -u
digunakan untuk mengaktifkan otentikasi nama pengguna dan kata sandi. Opsi tersebut harus diikuti dengan jalur ke file. Setiap baris file berhubungan dengan pengguna, dan nama pengguna serta kata sandi dipisahkan dengan koma ,
misalnya:
$ cat ./passwd
user1,123456
user2,666
user3,2333
$ ./server -u ./passwd
USERNAME/PASSWORD
3 users
Listening at 0.0.0.0:1080
Jika parameter -d
diberikan, server akan meninggalkan terminal dan menjadi proses daemon.
$ ./server -d
NO AUTHENTICATION REQUIRED
Listening at 0.0.0.0:1080
PID is [xxxxx]
$ netstat -ntlp | grep xxxxx
tcp 0 0 0.0.0.0:1080 0.0.0.0: * LISTEN xxxxx/./server
Proyek ini mengadopsi perjanjian lisensi sumber terbuka MIT.
MIT License
Copyright (c) 2019-2021 totravel
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.