#SS数据备忘
备忘笔记,任何错误均不负责。
- 明文内容
- 密文内容
- 通讯模型
##明文 SS 的明文数据结构上类似 socks5 协议中描述的数据结构。但是更加简单。SS省略了 socks5 的握手环节。客户端直接把要发的 TCP 包内容写给了服务器。
| #include <stdio.h> | |
| #include <windows.h> | |
| int main() | |
| { | |
| HANDLE hStdin = GetStdHandle(STD_INPUT_HANDLE);; | |
| INPUT_RECORD irInBuf[128]; | |
| DWORD i,cNumRead; | |
| bool exit = false; | |
| printf("Try to press some key\n"); |
#SS数据备忘
备忘笔记,任何错误均不负责。
##明文 SS 的明文数据结构上类似 socks5 协议中描述的数据结构。但是更加简单。SS省略了 socks5 的握手环节。客户端直接把要发的 TCP 包内容写给了服务器。
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <time.h> | |
| //#define DEBUG | |
| #ifndef DEBUG | |
| #define DEBUG 0 | |
| #endif | |
| typedef struct partialSum { |
| import Data.Array | |
| import Data.Array.IO | |
| import Data.Ix | |
| lcs :: String -> String -> Int | |
| lcs s t = a!(n,m) | |
| where a = array ((0,0),(n,m)) [((x,y), f x y)|x<-[0..n],y<-[0..m]] | |
| n = length s | |
| m = length t | |
| s'= array (0,n-1) $ zip [0..n-1] s |