{"id":37182265,"url":"https://github.com/yomiji/nan0chat","last_synced_at":"2026-01-14T21:01:03.751Z","repository":{"id":57551927,"uuid":"143184745","full_name":"yomiji/nan0chat","owner":"yomiji","description":"Secure terminal-based chat service demonstration of Nan0 API project","archived":false,"fork":false,"pushed_at":"2018-11-06T16:04:25.000Z","size":486,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-09T08:32:18.771Z","etag":null,"topics":["chat","console","console-ui","easy","encryption","example","go","golang","microservice","nan0","protobuf","protocol-buffers","services","tcp","termbox","termbox-go"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yomiji.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-01T17:00:25.000Z","updated_at":"2018-11-06T16:04:27.000Z","dependencies_parsed_at":"2022-09-26T18:41:39.005Z","dependency_job_id":null,"html_url":"https://github.com/yomiji/nan0chat","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/yomiji/nan0chat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yomiji%2Fnan0chat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yomiji%2Fnan0chat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yomiji%2Fnan0chat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yomiji%2Fnan0chat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yomiji","download_url":"https://codeload.github.com/yomiji/nan0chat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yomiji%2Fnan0chat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28434517,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chat","console","console-ui","easy","encryption","example","go","golang","microservice","nan0","protobuf","protocol-buffers","services","tcp","termbox","termbox-go"],"created_at":"2026-01-14T21:01:02.791Z","updated_at":"2026-01-14T21:01:03.676Z","avatar_url":"https://github.com/yomiji.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nan0Chat\n#### Secure Chat Client using Nan0 Services\n\nThis is a terminal-based chat server and client that demonstrates the [Nan0 API](https://github.com/yomiji/nan0)\n\n#### Building\nFrom the project root directory, do *go build* on entrypoint to create the program.\n```\ngo build Nan0Chat nan0chat/entrypoint\n```\n\n#### Running\nThere are a number of command-line flags that are used to configure the application:\n```\nUsage of Nan0Chat:\n  -host string\n        Host name for server (default \"localhost\")\n  -key string\n        Encryption Key encoded in Base64.\n  -port int\n        Port number for server (if --server is [true]) (default 6865)\n  -server\n        Is this a server? [[false]/true]\n  -sig string\n        HMAC Signature encoded in Base64.\n  -username string\n        A custom user name\n```\n* ***server*** is a flag that indicates whether or not a server is to be started, this defaults to false\n* ***host*** is the host name for the server, with the default being \"localhost\"\n* ***port*** is the port for the server, with the default being 6865\n* ***key*** is the encryption key, a 256bit string encoded in Base64, used for encryption\n* ***sig*** is the signature (HMAC), a 256bit string encoded in Base64, used for authentication\n* ***username*** is a custom username assigned to the client application (if a client is started)\n\n###### Start a server:\n```\n./Nan0Chat  --key \u003cencryption key\u003e --sig \u003csignature\u003e --server=true --port=6865\n```\nReplace \\\u003cencryption key\u003e with the encryption key and \\\u003csignature\u003e with the signature\n\n###### Start a client:\n```\n./Nan0Chat  --key \u003cencryption key\u003e --sig \u003csignature\u003e --host=localhost --server=false --port=6865 --username=Bob\n```\nReplace \\\u003cencryption key\u003e with the encryption key and \\\u003csignature\u003e with the signature\n\n#### Obtaining an Encryption Key and Signature\nTo obtain an encryption key and signature in base64, run the following snippet in a console:\n```go\npackage main\n\nimport (\n\t\"github.com/yomiji/nan0\"\n\t\"encoding/base64\"\n\t\"fmt\"\n)\n\n// A simple function to make the keys generated a sharable string\nfunc shareKeys() (encKeyShare, authKeyShare string) {\n\tencKeyBytes := nan0.NewEncryptionKey()\n\tauthKeyBytes := nan0.NewHMACKey()\n\n\tencKeyShare = base64.StdEncoding.EncodeToString(encKeyBytes[:])\n\tauthKeyShare = base64.StdEncoding.EncodeToString(authKeyBytes[:])\n\n\treturn\n}\n\nfunc main() {\n\t// create the keys\n\tencKey, sig := shareKeys()\n\t// print the keys to the console\n\tfmt.Printf(\"Encryption Key: %v\\nSignature: %v\", encKey, sig)\n}\n```\nOutput:\n\n***Do NOT use these specific keys in your application***\n```\nEncryption Key: eQypV5GrNg0Vh+E3A90HJq+89KL/52g/IQApnUm7E+I=\nSignature: Ll0RHmOxfYJi9Y5X5YaK078ZjCOHo4wBnDGenjtyqAw=\n```\n***Do NOT use these specific keys in your application***\n\n#### Usage\nThe server application will start with a message indicating that it is currently running. The server application must be\ninterrupted to close. In windows command prompt and linux terminal, you can achieve this by pressing the Ctrl+C\ncombination.\n\nThe client application is a simple edit box below a text area. Inside the text area, there will appear all text entered\ninto the edit box as well as all incoming messages dispatched from the service. The messages will be prepended with the\nname of the user who sent the message. Press the escape key to exit the client application.\n\n##### TODO\n* Better client disconnection handling\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyomiji%2Fnan0chat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyomiji%2Fnan0chat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyomiji%2Fnan0chat/lists"}