不要被网络钓鱼所害。我们没有宣布任何Token销售。谨防声称销售Marconi Token的人。

开发人员

marconi 应用

使用 Marconi 脚本编写去中心化应用,该脚本是一种可以访问网络数据包的图灵完备的语言。

去中心化应用可以提交至公共和私有网络的全局链或分支链

marconi

API 可帮助路由流量、分析数据包、识别模式、创建分支链和迁移Token。

抢先试用此 SDK

示例 代码

制定政策,确定网络允许的流量类型
  1. Contract IntranetFirewall {
  2. Init(Address target_address) {
  3. TunnelRef handle = mOpen(target_address);
  4. mApply(handle, {AllowOnlyCorpOrHTTPS});
  5. }
  6. }
  7. Status AllowOnlyCorpOrHTTPS(PacketRef packet) {
  8. if (packet.src().port() != 443 &&
  9. !packet.src().url().as_string().match('intranet.example.com')) {
  10. return Status::UNSAFE;
  11. }
  12. return Status::OK;
  13. }
  1. Contract IntranetFirewall {
  2. Init(Address target_address) {
  3. TunnelRef handle = mOpen(target_address);
  4. mApply(handle, {AllowOnlyCorpOrHTTPS});
  5. }
  6. }
  7. Status AllowOnlyCorpOrHTTPS(PacketRef packet) {
  8. if (packet.src().port() != 443 &&
  9. !packet.src().url().as_string()
  10. .match('intranet.foo.com')) {
  11. return Status::UNSAFE;
  12. }
  13. return Status::OK;
  14. }
只需几行代码,即可注册新的区块链
  1. $ marconi branch foo
  2. >>> Success. Created branch foo.
  3. $ marconi status --branch_name=foo
  4. >>> Branch foo: uninitialized.
  5. $ marconi init --config=/tmp/config.txt --branch_name=foo
  6. >>> Success. Configured branch foo.
  7. $ marconi run --branch_name=foo
  8. >>> Success. Running branch foo.
  1. $ marconi branch foo
  2. >>> Success. Created branch foo.
  3. $ marconi status --branch_name=foo
  4. >>> Branch foo: uninitialized.
  5. $ marconi init --config=
  6. /tmp/config.txt --branch_name=foo
  7. >>> Success. Configured branch foo.
  8. $ marconi run --branch_name=foo
  9. >>> Success. Running branch foo.
分析网络流量,识别网络钓鱼攻击,例如使用 Unicode 字符的伪装 URL
  1. Contract PhishCatcher {
  2. Init(Address client_address) {
  3. TunnelRef handle = mOpen(client_address);
  4. mApply(handle, {PhishFunc});
  5. }
  6. }
  7. Status PhishFunc(PacketRef packet) {
  8. if (packet.src().url().as_string().match('[^\u0000-\u007F]')) {
  9. return Status::UNSAFE;
  10. }
  11. return Status::OK;
  12. }
  1. Contract PhishCatcher {
  2. Init(Address client_address) {
  3. TunnelRef handle = mOpen(client_address);
  4. mApply(handle, {PhishFunc});
  5. }
  6. }
  7. Status PhishFunc(PacketRef packet) {
  8. if (packet.src().url().as_string()
  9. .match('[^\u0000-\u007F]')) {
  10. return Status::UNSAFE;
  11. }
  12. return Status::OK;
  13. }