您正在查看: 2022年8月

mac socks5 转http

安装privoxy

brew install privoxy

修改默认配置

sudo vi /usr/local/etc/privoxy/config

去掉注释修改

forward-socks5   /     用户:密码@代理IP:代理端口 

另外监听接口默认开启的 localhost:8118 如果有需要可以配置,没有需要就不用

启动privoxy

brew services start privoxy

参考

https://www.jianshu.com/p/7cc17860caaa
https://javasgl.github.io/transfer_socks5_to_http_proxy/

浏览器扩展

https://proxy-switchyomega.com/download/

jenkins pipeline read json

def props = readJSON file: 'dir/input.json'
assert props['attr1'] == 'One'
assert props.attr1 == 'One'

def props = readJSON text: '{ "key": "value" }'
assert props['key'] == 'value'
assert props.key == 'value'

def props = readJSON text: '[ "a", "b"]'
assert props[0] == 'a'
assert props[1] == 'b'

def props = readJSON text: '{ "key": null, "a": "b" }', returnPojo: true
assert props['key'] == null
props.each { key, value ->
    echo "Walked through key $key and value $value"
}

依赖插件
https://plugins.jenkins.io/pipeline-utility-steps/#releases
https://updates.jenkins.io/download/plugins/snakeyaml-api/1.30.2-76.vc104f7ce9870/snakeyaml-api.hpi

参考文档
https://www.jenkins.io/doc/pipeline/steps/pipeline-utility-steps/#readjson-read-json-from-files-in-the-workspace