SOCKS performs at Layer 5 of the OSI model (the session layer, an intermediate layer between the presentation layer and the transport layer). SOCKS server accepts incoming client connection on TCP port 1080.
SOCKS operates at a lower level than HTTP proxying: SOCKS uses a handshake protocol to inform the proxy software about the connection that the client is trying to make, and then acts as transparently as possible, whereas a regular proxy may interpret and rewrite headers (say, to employ another underlying protocol, such as FTP; however, an HTTP proxy simply forwards an HTTP request to the desired HTTP server). Though HTTP proxying has a different usage model in mind, the CONNECT method allows for forwarding TCP connections; however, SOCKS proxies can also forward UDP traffic and work in reverse, while HTTP proxies cannot. HTTP proxies are traditionally more aware of the HTTP protocol, performing higher-level filtering (though that usually only applies to GET and POST methods, not the CONNECT method).
Browser
Chrome: support SOCKS4, SOCKS4a and SOCKS5.
Firefox: support SOCKS4, SOCKS4a and SOCKS5.
Internet Explorer and EdgeHTML-based Microsoft Edge: support SOCKS4 only.
Chromium-based Microsoft Edge: support SOCKS4, SOCKS4a and SOCKS5.
Setting up dante-server (1.4.2+dfsg-7build1) ...#############################..........................................................................................]
Created symlink /etc/systemd/system/multi-user.target.wants/danted.service → /lib/systemd/system/danted.service.......................................................]
Processing triggers for man-db (2.9.1-1) ...#############################################################################################..............................]
Processing triggers for systemd (245.4-4ubuntu3.23) ...
复制配置文件:
root@vultr:~# cat /etc/danted.conf
logoutput: syslog
user.privileged: root
user.unprivileged: nobody
# The listening network interface or address.
internal: 0.0.0.0 port=1080
# The proxying network interface or address.
external: enp1s0
# socks-rules determine what is proxied through the external interface.
socksmethod: username
# client-rules determine who can connect to the internal interface.
clientmethod: none
client pass {
from: 8.134.141.89/32 to: 0.0.0.0/0
}
socks pass {
from: 8.134.141.89/32 to: 0.0.0.0/0
}
添加用于登录的用户:
root@vultr:~# useradd -r -s /bin/false vbird
root@vultr:~# passwd vbird
New password:
Retype new password:
passwd: password updated successfully
启动服务:
root@vultr:~# systemctl status danted.service
● danted.service - SOCKS (v4 and v5) proxy daemon (danted)
SOCKS is a protocol used for proxies and curl supports it. curl supports both SOCKS version 4 as well as version 5, and both versions come in two flavors.
You can select the specific SOCKS version to use by using the correct scheme part for the given proxy host with -x, or you can specify it with a separate option instead of -x.
SOCKS5 is for the version 5 and SOCKS5-hostname is for the version 5 without resolving the hostname locally:
Feature Bandwidth Traffic Throughput Definition Maximum data transfer rate Actual data being transmitted Actual data transfer rate achieved Measure Capacity (bps) Data volume (bytes or packets) Transfer rate (bps) Static vs. Dynamic Static (connection property) Dynamic (varies over time) Dynamic (affected by network conditions) Impact on Performance Determines potential data transfer speed Affects network congestion and utilization Measures actual network performance 表格一览: 名称 符号 b/s B/s 示例 比特每秒 b/s 1 1/8 字节每秒 B/s 8 1 千比特每秒 kb/s 1000 = 10^3 125 = 10^3/8 二进制千比特每秒 Kib/s 1024 = 2^10 128 = 2^10/8 千字节每秒 kB/s 8000 = 8*10^3 1000 = 10^3 二进制千字节每秒 KiB/s 8192 = 8*2^10 1024 = 2^10 k 与 Ki k 与 Ki 分别表示 kilo-(千) 与 kibi-(二进制千) 。作为前缀使用时, k 表示 1,000,Ki 表示1,024 ,因为“Ki”来源于它在计算机方面 2^10 = 1,024 的使用。不幸的是,人们常常错误地用 K 代替 Ki。此外,不知晓其中微妙差别的广大公众,常常不加区别地使用“Kbps”与“Kibps”,造成了混乱。总之,使用“Kibps”通常是正确的。 The bit rate is expressed in the unit bit per second (symbol: bit/s), often in conjunction with an SI prefix such as kilo (1...
A process is an executing instance of a program with its own memory and resources, while a thread is the smallest unit of execution within a process that can run concurrently with other threads in the same process . Processes are isolated with separate address spaces and require system-provided inter-process communication to share data, whereas threads share the process's memory and resources, allowing for faster communication and context switching. Process vs. Thread Process: An independent program in execution. Has its own separate memory address space. Carries more state information and resources (like open files and system handles). Data sharing requires Inter-Process Communication (IPC) mechanisms. Considered a "heavyweight" unit of execution due to resource overhead for creation and context switching. Thread: A subset of a process , executing within the process's context. Shares the process's address space, memory, and ...
Journaling filesystem 基本原理 更新文件系统以反映文件和目录的更改通常需要许多单独的写入操作。这使得写入之间可能发生中断(例如电源故障或系统崩溃),从而使数据结构处于无效的中间状态。[1] 例如,删除 Unix 文件系统上的文件涉及三个步骤:[7] 删除其目录条目。(Removing its directory entry.) 将索引节点释放到空闲索引节点池中。(Releasing the inode to the pool of free inodes.) 将所有磁盘块返回到空闲磁盘块池。(Returning all disk blocks to the pool of free disk blocks.) 如果在步骤1之后和步骤2之前发生崩溃,就会出现孤立的inode,从而导致存储泄漏;如果在步骤2和步骤3之间发生崩溃,则该文件先前使用的块将无法用于新文件,从而有效地减少了文件系统的存储容量。重新安排步骤也无济于事。如果步骤 3 在步骤 1 之前,则它们之间的崩溃可能允许文件的块重新用于新文件,这意味着部分删除的文件将包含另一个文件的部分内容,并且对任一文件的修改都会显示在两个文件中。另一方面,如果步骤 2 在步骤 1 之前,则它们之间的崩溃将导致文件无法访问,尽管该文件看起来存在。 检测此类不一致并从中恢复通常需要完整地检查其数据结构,例如通过 fsck (文件系统检查器)等工具。[2] 这通常必须在下次安装文件系统以进行读写访问之前完成。如果文件系统很大并且 I/O 带宽相对较小,则这可能会花费很长时间,并且如果它阻止系统的其余部分恢复联机,则会导致更长的停机时间。 为了防止这种情况,日志文件系统分配一个特殊区域——日志——在其中记录它将提前进行的更改。崩溃后,恢复只需从文件系统读取日志并重播该日志中的更改,直到文件系统再次保持一致。因此,这些更改被认为是原子的(不可整除),因为它们要么成功(最初成功或在恢复期间完全重播),要么根本不重播(被跳过,因为它们在之前尚未完全写入日志)发生崩溃)。 JFS(1990)->NTFS(1993)->XFS(1994)->Apple HFS Plus(1998)->ext3(2001)->ext4(2008) ext和ext2文件系统不是日志文件系统 日誌式檔...
评论
发表评论