{"id":18841957,"url":"https://github.com/ahmetozer/basic-server","last_synced_at":"2025-04-14T07:31:22.965Z","repository":{"id":46990761,"uuid":"364102097","full_name":"ahmetozer/basic-server","owner":"ahmetozer","description":"A basic file server automatically generates self certificates and serves the given folder.","archived":false,"fork":false,"pushed_at":"2021-05-04T01:01:15.000Z","size":12,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T21:12:23.017Z","etag":null,"topics":["cloudflare","http","https","https-server"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ahmetozer.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":"2021-05-04T00:55:57.000Z","updated_at":"2022-07-20T01:44:38.000Z","dependencies_parsed_at":"2022-09-24T20:10:14.702Z","dependency_job_id":null,"html_url":"https://github.com/ahmetozer/basic-server","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetozer%2Fbasic-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetozer%2Fbasic-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetozer%2Fbasic-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetozer%2Fbasic-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahmetozer","download_url":"https://codeload.github.com/ahmetozer/basic-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248839364,"owners_count":21169800,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cloudflare","http","https","https-server"],"created_at":"2024-11-08T02:53:12.982Z","updated_at":"2025-04-14T07:31:22.677Z","avatar_url":"https://github.com/ahmetozer.png","language":"Go","readme":"# Basic Server\n\nA basic file server automatically generates self certificates and serves the given folder.\n\n## Options\n\n```bash\nUsage of /basic-server:\n  -client-cert string\n        Allow only given client certificate\n  -listen string\n        Listen addr (default \":443\")\n  -path string\n        Share Path (default \"/web/\") # Note if you not run in container, default path will be current path\n  -server-cert string\n        Server cert\n  -server-key string\n        Server key\n  -server-name string\n        Server name check from TLS\n```\n\n## Examples\n\n### Run on local\n\n```cmd\nC:\\Users\\Ahmet\\Desktop\\basic-server.exe -h\n2021/05/04 02:46:55 github.com/ahmetozer/basic-server\n2021/05/04 02:46:55 Current name WORKSTATION\\Ahmet\n2021/05/04 02:46:55 ./key.pem exist\n2021/05/04 02:46:55 ./cert.pem exist\n2021/05/04 02:29:51 Starting HTTPS server on :443 at C:\\Users\\Ahmet\\Desktop\\\n```\n\n### Run in container\n\nThis configuration accepts all https clients with all domains.\n\n```bash\ndocker run -it --rm -p 443:443 --mount type=bind,source=\"/my/path/\",target=/web/,readonly  ghcr.io/ahmetozer/basic-server\n```\n\n### Run in container with client cert control\n\nTo allow incoming request from only cloudflare enable 'Authenticated Origin Pulls' in cloudflare.\n\n```bash\ndocker run -it --rm -p 443:443 --mount type=bind,source=\"/my/path/\",target=/web/,readonly ghcr.io/ahmetozer/basic-server \\\n--server-name mydomain.test  --client-cert /config/client-cloudflare.pem\n```\n\n### Run in different user\n\nYou can also run in different user id for access shared path.\n\n```bash\ndocker run -it --rm -p 443:443 -u 1249:1249 --mount type=bind,source=\"/secret/my/path/\",target=/web/,readonly ghcr.io/ahmetozer/basic-server \\\n--server-name mydomain.test  --client-cert config/client-cloudflare.pem\n```\n\n## Dump\n\nYou can also inspect your HTTP request with visiting /dump page.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmetozer%2Fbasic-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahmetozer%2Fbasic-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmetozer%2Fbasic-server/lists"}