Docker 本身DNS是不穩定的

再分享早上碰到docker穩定度問題,docker內到外網是靠本機的iptables做Nat出去,早上就發現運行很久的docker container,突然不送資料到ELK,一查發現DNS掛了,這之前也碰到幾次了,基本上不是中心DNS掛了,而且Docker本身架構的DNS掛了,基本上只要重啟docker service後就正常,無需對主機重啟,而重啟docker service是一件很嚴重的事情,因為上面所有的服務都會一併被下線,之後還要在把運行的服務全部重新上線… 也許我的理解是錯誤,但只能以目前的情況來判斷,也許是iptables nat轉換的問題,但本機沒有重開機,理論上就沒有這個問題才是。

2019-11-07 · 1 min · 6 words · Me

[轉]What's New in Ethereum Serenity (2.0)

http://kimiwublog.blogspot.com/2018/12/whats-new-in-ethereum-serenity-20.html 需注意,時間是2018/12/06 內容肯不會是最正確的

2019-11-06 · 1 min · 3 words · Me

[DIY] HyperLedger

1. Use docker-machine crate docker vm. And install docker-compose. 2. https://github.com/hyperledger/fabric-samples # Fetch bootstrap.sh from fabric repository using curl -sS https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh -o ./scripts/bootstrap.sh # Change file mode to executable chmod +x ./scripts/bootstrap.sh # Download binaries and docker images #./scripts/bootstrap.sh [version] [ca version] [thirdparty_version] ./scripts/bootstrap.sh Here use all default value. 3. https://hyperledger-fabric.readthedocs.io/en/latest/build_network.html # Start Run cd fabric-samples/first-network ./byfn.sh generate ./byfn.sh up 4. Hope you see ===================== Query successful on peer1.org2 on channel ‘mychannel’ ===================== ...

2019-11-05 · 1 min · 204 words · Me

[轉]SSLH 是一款采用 C 语言编写的开源端口复用软件,目前支持 HTTP、SSL、SSH、OpenVPN、Tinc、XMPP 等多种协议识别

https://mp.weixin.qq.com/s/sHitMzs8KXXO6joX8QqO_A?fbclid=IwAR1UGD7gemvKRY-IkOCEHGDru6YLDkI2vXojKpLTc-AZ4gN2Zz849YwJKZ8 SSLH 是一款采用 C 语言编写的开源端口复用软件,目前支持 HTTP、SSL、SSH、OpenVPN、Tinc、XMPP 等多种协议识别。它主要运行于 *nix 环境,源代码托管在 GitHub 上。 项目地址:https://github.com/yrutschle/sslh 更简单地说,SSLH 允许我们在 Linux 系统上的同一端口上运行多个程序/服务。因此,您可以用同一端口来同时使用两种服务。如果你遇到大多数端口被防火墙阻止的情况,SSLH 就可以帮你派上大用场。下面我们就来看一个 SSL 和 SSH 同时复用同一端口的实例。

2019-11-01 · 1 min · 21 words · Me

[轉][Flutter]还在大量使用TextEditingController?试试这种解决方案

当用户输入大量信息时,通常会采用TextField列表来解决,这时如果需要对每个TextField进行控制或监听就需要大量的TextEditingController。 这里提供另一种思路,解决大量使用TextEditingController和信息整理困难的问题。 定义一个Map: Map _userInfo; 这个Map作用于所有需要收集用户信息的地方。 使用TextField时这样操作: ////邮箱 TextField( controller: TextEditingController(text: _userInfo['account']), onChanged: (value) { _userInfo['account'] = value; }, ), ////昵称 TextField( controller: TextEditingController(text: _userInfo['nickname']), onChanged: (value) { _userInfo['nickname'] = value; }, ), ////密码 TextField( controller: TextEditingController(text: _userInfo['password']), onChanged: (value) { _userInfo['password'] = value; }, ), 这里全程未单独定义TextEditingController,只使用TextField默认的方法进行控制,且可以获得以下好处: 1.节省大量代码,简化业务逻辑。 2.用户输入完成时即得到一个包含所有信息的Map。 3.输入的内容不会丢失,只要这个Map不被销毁,下次进入(或返回)这个页面时所有内容都在,不用要求用户再次输入,提升用户体验。 第一次发文章,如有问题,欢迎指正。 作者:xSILENCEx 链接:https://juejin.im/post/5d649bfce51d453b1d648314 来源:掘金 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

2019-10-31 · 1 min · 55 words · Me