開発者

marconi アプリケーション
ネットワークパケットにアクセスできるチューリング完全言語のMarconi スクリプトを使用して、分散型アプリケーションを記述します。
分散型アプリをグローバルチェーンやブランチチェーンに送信することによって、パブリックネットワークやプライベートネットワークを構築できます。
marconi ライブラリ
APIを利用することによって、トラフィックルーティング、パケット分析、パターン認識、ブランチチェーンの作成、トークンの移行が可能になります。
SDKへのアーリーアクセスを利用する
サンプル コード
ネットワークで許可されるトラフィックの種類を決めるポリシーを確立できます
- Contract IntranetFirewall {
- Init(Address target_address) {
- TunnelRef handle = mOpen(target_address);
- mApply(handle, {AllowOnlyCorpOrHTTPS});
- }
- }
- Status AllowOnlyCorpOrHTTPS(PacketRef packet) {
- if (packet.src().port() != 443 &&
- !packet.src().url().as_string().match('intranet.example.com')) {
- return Status::UNSAFE;
- }
- return Status::OK;
- }
- Contract IntranetFirewall {
- Init(Address target_address) {
- TunnelRef handle = mOpen(target_address);
- mApply(handle, {AllowOnlyCorpOrHTTPS});
- }
- }
- Status AllowOnlyCorpOrHTTPS(PacketRef packet) {
- if (packet.src().port() != 443 &&
- !packet.src().url().as_string()
- .match('intranet.foo.com')) {
- return Status::UNSAFE;
- }
- return Status::OK;
- }
わずか数行のコードで新しいブロックチェーンを強化できます
- $ marconi branch foo
- >>> Success. Created branch foo.
- $ marconi status --branch_name=foo
- >>> Branch foo: uninitialized.
- $ marconi init --config=/tmp/config.txt --branch_name=foo
- >>> Success. Configured branch foo.
- $ marconi run --branch_name=foo
- >>> Success. Running branch foo.
- $ marconi branch foo
- >>> Success. Created branch foo.
- $ marconi status --branch_name=foo
- >>> Branch foo: uninitialized.
- $ marconi init --config=
- /tmp/config.txt --branch_name=foo
- >>> Success. Configured branch foo.
- $ marconi run --branch_name=foo
- >>> Success. Running branch foo.
Unicode文字によるURLのマスカレードのようなフィッシング攻撃がないかネットワークトラフィックを分析します
- Contract PhishCatcher {
- Init(Address client_address) {
- TunnelRef handle = mOpen(client_address);
- mApply(handle, {PhishFunc});
- }
- }
- Status PhishFunc(PacketRef packet) {
- if (packet.src().url().as_string().match('[^\u0000-\u007F]')) {
- return Status::UNSAFE;
- }
- return Status::OK;
- }
- Contract PhishCatcher {
- Init(Address client_address) {
- TunnelRef handle = mOpen(client_address);
- mApply(handle, {PhishFunc});
- }
- }
- Status PhishFunc(PacketRef packet) {
- if (packet.src().url().as_string()
- .match('[^\u0000-\u007F]')) {
- return Status::UNSAFE;
- }
- return Status::OK;
- }