SSL 设计目标:
- 防内容篡改
- 防冒充服务器身份
- 加密通信内容
而翻墙的目标:
- 不被检测出客户端在访问什么网站
- 不被检测出服务器在提供翻墙服务
@startuml | |
' uncomment the line below if you're using computer with a retina display | |
' skinparam dpi 300 | |
!define Table(name,desc) class name as "desc" << (T,#FFAAAA) >> | |
' we use bold for primary key | |
' green color for unique | |
' and underscore for not_null | |
!define primary_key(x) <b>x</b> | |
!define unique(x) <color:green>x</color> | |
!define not_null(x) <u>x</u> |
SSL 设计目标:
而翻墙的目标:
# 中国移动 | |
0.0.0.0 config.cmpassport.com | |
0.0.0.0 www.cmpassport.com | |
0.0.0.0 wap.cmpassport.com | |
0.0.0.0 onekey1.cmpassport.com | |
0.0.0.0 log1.cmpassport.com | |
0.0.0.0 smsks1.cmpassport.com | |
0.0.0.0 verify.cmpassport.com | |
# 中国联通 |
.column { | |
background-color: rgba(238, 238, 238, 0.85); | |
border-radius: 1em; | |
margin: 1.5em; | |
} | |
body { | |
/** | |
The bing wallpaper service is provided by: | |
https://github.com/TimothyYe/bing-wallpaper. |
{ | |
/* Override symbols so other apps can bind */ | |
/* ~ stands for option, ^ stands for control */ | |
"~j" = "noop:"; | |
"~i" = "noop:"; | |
"~;" = "noop:"; | |
"~a" = "noop:"; | |
"~2" = "noop:"; | |
"~g" = "noop:"; | |
"~y" = "noop:"; |
采取 RESTful 风格的 api 是否应该对结果包一层?
又是基于 HTTP 的 API 设计问题
我个人的想法是:
RESTful 和 RPC 风格各有优劣,具体场景具体分析,但是整体一致最重要,不一致的 API 始终是最糟糕的。
如果要添加错误码,错误码最好放在 HTTP 头里面,这样可以在不读取 payload 的情况下判断是否存在错误
例如:X-Error-Code: 10001
或者 X-Error-Code: OUT_OF_CREDIT
#!/usr/bin/env bash | |
set -e | |
error() { | |
local sourcefile=$1 | |
local lineno=$2 | |
printf "Error: ${sourcefile}:${lineno}\n\n" | |
} | |
trap 'error "${BASH_SOURCE}" "${LINENO}"' ERR |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>limit.maxfiles</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>launchctl</string> | |
<string>limit</string> |
先开启开发者模式,并连接到 adb shell,然后在 adb shell 中执行下面的命令:
# 禁用腾讯小微语音搜索:(也会禁用搜索功能)
pm disable-user --user 0 com.sony.dtv.searchapp
# 禁用京东智能家居
pm disable-user --user 0 com.jd.smartservicetwo
# 禁用原装桌面(**执行前请务必确认已安装第三方桌面,否则可能无法使用遥控器控制电视**)
pm disable-user --user 0 com.dangbei.TVHomeLauncher