安装

1
yum install nfs-utils

配置

  • /etc/exports
1
/data/nfs/iso *(rw,sync,no_subtree_check,no_root_squash)
  • man: https://linux.die.net/man/5/exports

启动

1
2
3
systemctl start nfs-server.service
systemctl enable nfs-server.service
systemctl status nfs-server.service

修改 ~/.ssh/config 文件,添加以下内容

1
2
3
Host github.com
HostName github.com
ProxyCommand /usr/bin/nc -X connect -x 127.0.0.1:7890 %h %p

如果出现 Connection closed by UNKNOWN port 65535 错误,说明当前代理服务器不支持,切换其他节点即可。

1
osascript -l AppleScript -e 'display notification "Hello World!" with title "Hi!"'

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: api-envoy-filter
namespace: istio-system
spec:
configPatches:
- applyTo: NETWORK_FILTER
match:
context: GATEWAY
listener:
filterChain:
filter:
name: envoy.filters.network.http_connection_manager
patch:
operation: MERGE
value:
typed_config:
"@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager"
preserve_external_request_id: true

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
function trim_prefix(s, p)
return (s:sub(0, #p) == p) and s:sub(#p + 1) or s
end

function envoy_on_request(request_handle)
local idx = 0
for chunk in request_handle:bodyChunks() do
local len = chunk:length()
if len == 0 then
break
end
local body = chunk:getBytes(idx, len)
idx = idx + len
local hds = {}
for key, value in pairs(request_handle:headers()) do
hds["y-" .. trim_prefix(key, ":")] = value
end
hds[":method"] = "POST"
hds[":path"] = "/log"
hds[":authority"] = "envoy"
request_handle:httpCall("http-log-service", hds, body, 10000, true)
end
end

function envoy_on_response(response_handle)
end
1
2
3
4
5
6
7
8
9
10
11
12
13
14
static_resources:
clusters:
- name: http-log-service
type: STRICT_DNS
connect_timeout: 10s
load_assignment:
cluster_name: http-log-service
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: 127.0.0.1
port_value: 9709