如何部署Shadowsocks-rust和Cloak
前言无庸讳言,Shadowsocks是一款优异的穿墙利器。首先,作为开源项目,用户无需为其软件付费,只需要承担租赁虚拟主机的硬件成本。其次,该软件小巧灵活,布署简单,非常适合个人用户独立架设使用。也因此不用涉及虚拟主机之外的任何其他第三方的网络服务提供商,在数据安全方面更有保证。 现在网上常见的shadowsocks在Ubuntu上的部署教程大多基于shadowsocks-libev。问题在于,shadowsocks-libev已停止开发,仅仅处于维护状态,相关开发已移向shadowsocks-rust。正如在其github的README文件中说的:Bug-fix-only libev port of shadowsocks. Future development moved to shadowsocks-rust抵抗网络封锁是一场需要不断进行技术升级的猫鼠游戏。在近日的使用中,我发现shadowsocks-libev已越来越频繁地出现服务中断、需要重启的状况。是时候迁移到Shadowsocks的下一代port——Shadowsocks-rust了! 但是网上适合用户难度的、反映...
Rust 能自动推断出所有的lifetime吗?
答: 不能。 我觉得前面的回答都不能解决这位题主的疑惑 。我想了一个有点绕的例子,来说明编译器是不能自动推断出generic lifetime的,因为可行的标注方法不只一种(楼上那个longest例子从逻辑上看似乎只剩下一种标注方法了,所以不具有足够的说服力)。 如下面定义的函数根据短字符串的长度来截取长字符串,该函数因为没有标注lifetime无法成功编译:fn cut_long_according_to_short(l: &str, s: &str) -> &str { let len = s.len(); &l[0..len] } 有两种不同的标注方法可以实现成功编译,编译器无法自动推断出该采用哪一个。 第一种比较宽松:fn cut_long_according_to_short<'a>(l: &'a str, s: &str) -> &'a str { let len = s.len(); &l[0..len] } 第二种比较严格:fn cut_long_according_to_s...
读书笔记:签名与验证
我对 Programming Bitcoin 的第三章的后半部分——签名和验证——理解不够清楚。现结合书中这部分内容按照自己的理解来理一理逻辑线索。这个和书中所要传达的意思可能并不一致。所有错误归于我自己,与原书作者无关。签名与验证的基本原理定义所有权我们利用椭圆曲线来表达对某物的所有权关系。我们以椭圆曲线上的某个点P来代表某一物。可以理解P为打在某物上的不可撕毁和改变的标签。这个P被称为公钥,是每个人可见的。因为是二维平面上的曲线上的一个点,因此公钥P由横坐标和纵坐标的两个值构成。在椭圆曲线上,可以作为公钥的点必须满足一条性质,即其为曲线上一个特定的点G的倍数,即eG=P。G点是每个人都知道的,其坐标数值是公共知识。但是倍数e是私人知识。因为从P和G的数值推测出e的值是极为困难以至被认为是不可能的。这被称为“离散对数难题”(discrete log problem)。我们说知道e的值的人为P所代表的物的所有者。因为只有他能给出从G到P的确切的倍数,从而可以获得排他的所有权。e被称为私钥。验证所有权但是难点在于,e的所有者既要向人们证明他知道e,又不能向别人直接透露e,否则人人都...
Graduated as a PhD of Business Administration (Finance), developing into an independent researcher of cryptos, DeFi, and monetary economics

Subscribe to Aulee
如何部署Shadowsocks-rust和Cloak
前言无庸讳言,Shadowsocks是一款优异的穿墙利器。首先,作为开源项目,用户无需为其软件付费,只需要承担租赁虚拟主机的硬件成本。其次,该软件小巧灵活,布署简单,非常适合个人用户独立架设使用。也因此不用涉及虚拟主机之外的任何其他第三方的网络服务提供商,在数据安全方面更有保证。 现在网上常见的shadowsocks在Ubuntu上的部署教程大多基于shadowsocks-libev。问题在于,shadowsocks-libev已停止开发,仅仅处于维护状态,相关开发已移向shadowsocks-rust。正如在其github的README文件中说的:Bug-fix-only libev port of shadowsocks. Future development moved to shadowsocks-rust抵抗网络封锁是一场需要不断进行技术升级的猫鼠游戏。在近日的使用中,我发现shadowsocks-libev已越来越频繁地出现服务中断、需要重启的状况。是时候迁移到Shadowsocks的下一代port——Shadowsocks-rust了! 但是网上适合用户难度的、反映...
Rust 能自动推断出所有的lifetime吗?
答: 不能。 我觉得前面的回答都不能解决这位题主的疑惑 。我想了一个有点绕的例子,来说明编译器是不能自动推断出generic lifetime的,因为可行的标注方法不只一种(楼上那个longest例子从逻辑上看似乎只剩下一种标注方法了,所以不具有足够的说服力)。 如下面定义的函数根据短字符串的长度来截取长字符串,该函数因为没有标注lifetime无法成功编译:fn cut_long_according_to_short(l: &str, s: &str) -> &str { let len = s.len(); &l[0..len] } 有两种不同的标注方法可以实现成功编译,编译器无法自动推断出该采用哪一个。 第一种比较宽松:fn cut_long_according_to_short<'a>(l: &'a str, s: &str) -> &'a str { let len = s.len(); &l[0..len] } 第二种比较严格:fn cut_long_according_to_s...
读书笔记:签名与验证
我对 Programming Bitcoin 的第三章的后半部分——签名和验证——理解不够清楚。现结合书中这部分内容按照自己的理解来理一理逻辑线索。这个和书中所要传达的意思可能并不一致。所有错误归于我自己,与原书作者无关。签名与验证的基本原理定义所有权我们利用椭圆曲线来表达对某物的所有权关系。我们以椭圆曲线上的某个点P来代表某一物。可以理解P为打在某物上的不可撕毁和改变的标签。这个P被称为公钥,是每个人可见的。因为是二维平面上的曲线上的一个点,因此公钥P由横坐标和纵坐标的两个值构成。在椭圆曲线上,可以作为公钥的点必须满足一条性质,即其为曲线上一个特定的点G的倍数,即eG=P。G点是每个人都知道的,其坐标数值是公共知识。但是倍数e是私人知识。因为从P和G的数值推测出e的值是极为困难以至被认为是不可能的。这被称为“离散对数难题”(discrete log problem)。我们说知道e的值的人为P所代表的物的所有者。因为只有他能给出从G到P的确切的倍数,从而可以获得排他的所有权。e被称为私钥。验证所有权但是难点在于,e的所有者既要向人们证明他知道e,又不能向别人直接透露e,否则人人都...
<100 subscribers
<100 subscribers
The wants of individuals which labour is intended to gratify, are the natural guides to their exertions. The instant they are compelled to labour for others, this guide forsakes them, and their exertions are dictated by the greed and avarice, and false hopes of their masters. The wants springing from our organization, and accompanying the power to labour, being created by the same hand which creates and fashions the whole universe, including the course of the seasons, and what the earth brings forth, it is fair to suppose that they would at all times guide the exertions of the labourer, so as fully to ensure a supply of necessaries and conveniences, and nothing more. They have, as it were, a prototype in nature, agreeing with other phenomena, but the avarice and greed of masters have no such prototype. They stand isolated and apart from all the great phenomena of the universe. They were originally crimes condemned by our moral sentiments, and still have their source in our crime-begotten political systems. Nature disowns them as a guide to action, and punishes us for following them. By this system the hand is dissevered from the mouth, and labour is put in motion to gratify vanity and ambition, not the natural wants of animal existence. When we look at the commercial history of our country, and see the false hopes of our merchants and manufacturers leading to periodical commercial convulsions, we are compelled to conclude, that they have not the same source as the regular and harmonious external world. Capitalists have no guide to their exertions, because nature rejects and opposes their dominion over labour. Starts of national prosperity, followed by bankruptcy and ruin, have the same source then as fraud and forgery. To our legal [as opposed to natural] right of property we are indebted for those gleams of false wealth and real panic, which have so frequently shook, to its centre, the whole trading world.
Thomas Hodgskin, The Natural and Artificial Right of Property Contrasted, 1832
翻译:
劳动所要满足的个体的需要,是对个体努力的自然引导。一旦个体被迫为他人劳动,这一引导便放弃他们,他们的努力转由主人的贪婪、占有欲和虚假的希望所支配。需要源自我们的组织,和劳动的力量一起由创造和形塑整个宇宙的同一双手所创造。其创造还包括四季的轮替和大地的产出。可以合理地推测,他们将始终引导劳动者的努力,以完全保证必需品和便利设施的供应,此外无余。他们在某种程度上就好像在自然界中拥有原型,并与其他现象相符合。但是,主人的占有欲和贪婪没有这样的原型。他们同宇宙的所有伟大现象孤立和分离开来。他们原本是为我们的道德情操所谴责的犯罪,并与我们的产生自犯罪的政治系统颇有渊源。自然拒绝他们作为行动的引导,并因我们追随他们而惩罚我们。在这个体制中手与口相分离,劳动被驱使去满足虚荣心和野心,而不是动物生存的自然需要。当我们审视我们国家的商业史,看到商人和企业家的虚假希望导致周期性的商业动荡时,我们不得不得出结论,它们与规律和和谐的外部世界并无相同的源头。资本家无可引导个体的努力,因为自然界拒绝和反对他们对劳动的统治。以破产和毁灭为终点的国家繁荣的开端来源于欺诈和伪造。是因为我们的法律财产权利(与自然财产权利相对)才导致了虚假繁荣的光焰和真实的恐惧。这在过去五十年中如此频繁地动摇着整个贸易世界,直抵其中心。
The wants of individuals which labour is intended to gratify, are the natural guides to their exertions. The instant they are compelled to labour for others, this guide forsakes them, and their exertions are dictated by the greed and avarice, and false hopes of their masters. The wants springing from our organization, and accompanying the power to labour, being created by the same hand which creates and fashions the whole universe, including the course of the seasons, and what the earth brings forth, it is fair to suppose that they would at all times guide the exertions of the labourer, so as fully to ensure a supply of necessaries and conveniences, and nothing more. They have, as it were, a prototype in nature, agreeing with other phenomena, but the avarice and greed of masters have no such prototype. They stand isolated and apart from all the great phenomena of the universe. They were originally crimes condemned by our moral sentiments, and still have their source in our crime-begotten political systems. Nature disowns them as a guide to action, and punishes us for following them. By this system the hand is dissevered from the mouth, and labour is put in motion to gratify vanity and ambition, not the natural wants of animal existence. When we look at the commercial history of our country, and see the false hopes of our merchants and manufacturers leading to periodical commercial convulsions, we are compelled to conclude, that they have not the same source as the regular and harmonious external world. Capitalists have no guide to their exertions, because nature rejects and opposes their dominion over labour. Starts of national prosperity, followed by bankruptcy and ruin, have the same source then as fraud and forgery. To our legal [as opposed to natural] right of property we are indebted for those gleams of false wealth and real panic, which have so frequently shook, to its centre, the whole trading world.
Thomas Hodgskin, The Natural and Artificial Right of Property Contrasted, 1832
翻译:
劳动所要满足的个体的需要,是对个体努力的自然引导。一旦个体被迫为他人劳动,这一引导便放弃他们,他们的努力转由主人的贪婪、占有欲和虚假的希望所支配。需要源自我们的组织,和劳动的力量一起由创造和形塑整个宇宙的同一双手所创造。其创造还包括四季的轮替和大地的产出。可以合理地推测,他们将始终引导劳动者的努力,以完全保证必需品和便利设施的供应,此外无余。他们在某种程度上就好像在自然界中拥有原型,并与其他现象相符合。但是,主人的占有欲和贪婪没有这样的原型。他们同宇宙的所有伟大现象孤立和分离开来。他们原本是为我们的道德情操所谴责的犯罪,并与我们的产生自犯罪的政治系统颇有渊源。自然拒绝他们作为行动的引导,并因我们追随他们而惩罚我们。在这个体制中手与口相分离,劳动被驱使去满足虚荣心和野心,而不是动物生存的自然需要。当我们审视我们国家的商业史,看到商人和企业家的虚假希望导致周期性的商业动荡时,我们不得不得出结论,它们与规律和和谐的外部世界并无相同的源头。资本家无可引导个体的努力,因为自然界拒绝和反对他们对劳动的统治。以破产和毁灭为终点的国家繁荣的开端来源于欺诈和伪造。是因为我们的法律财产权利(与自然财产权利相对)才导致了虚假繁荣的光焰和真实的恐惧。这在过去五十年中如此频繁地动摇着整个贸易世界,直抵其中心。
Share Dialog
Share Dialog
No activity yet