{"id":16519963,"url":"https://github.com/schmich/sfs","last_synced_at":"2025-10-28T07:31:35.044Z","repository":{"id":42406333,"uuid":"62027786","full_name":"schmich/sfs","owner":"schmich","description":"HTTP Static File Server and Proxy","archived":false,"fork":false,"pushed_at":"2024-12-11T23:36:03.000Z","size":50,"stargazers_count":9,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-01T12:45:32.411Z","etag":null,"topics":["cross-platform","development","devtools","go","golang","http","https","proxy","server","ssl","static-site","tls","web","web-server","webserver"],"latest_commit_sha":null,"homepage":"","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/schmich.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-27T05:29:45.000Z","updated_at":"2024-12-11T23:36:01.000Z","dependencies_parsed_at":"2024-06-21T17:50:27.447Z","dependency_job_id":null,"html_url":"https://github.com/schmich/sfs","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schmich%2Fsfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schmich%2Fsfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schmich%2Fsfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schmich%2Fsfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schmich","download_url":"https://codeload.github.com/schmich/sfs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238614543,"owners_count":19501477,"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":["cross-platform","development","devtools","go","golang","http","https","proxy","server","ssl","static-site","tls","web","web-server","webserver"],"created_at":"2024-10-11T16:49:02.428Z","updated_at":"2025-10-28T07:31:29.768Z","avatar_url":"https://github.com/schmich.png","language":"Go","readme":"# sfs\n\nAn HTTP static file web server and proxy for serving files from a directory on macOS, Windows, or Linux.\n\nIntended as a lightweight development tool for viewing static sites, e.g. documentation, blogs, diagnostic reports, HTML mockups, and prototypes.\n\n## Install\n\n[Download the zero-install binary](https://github.com/schmich/sfs/releases) to a directory on your `PATH`.\n\n## Usage\n\n```\nUsage: sfs [-l=\u003cip:port\u003e] [-s] [-a [USER] PASS] [-d=\u003cdir\u003e] [-b] [-f=\u003cformat\u003e] [-q] [-c] [-x=\u003curl\u003e]\n\nStatic File Server - https://github.com/schmich/sfs\n\nArguments:\n  USER            Username for digest authentication\n  PASS            Password for digest authentication\n\nOptions:\n  -l, --listen    IP and port to listen on (default \"127.0.0.1:8080\")\n  -s, --secure    Enable HTTPS with self-signed TLS certificate\n  -a, --auth      Enable digest authentication\n  -d, --dir       Directory to serve\n  -b, --browser   Open web browser after server starts\n  -f, --format    Log format: %i %t %m %u %s %b %a (default \"%i - %m %u %s\")\n  -q, --quiet     Disable request logging\n  -c, --cache     Allow cached responses\n  -x, --proxy     Proxy requests to upstream server (implies -c)\n  -v, --version   Show the version and exit\n```\n\n## Examples\n\nStart a web server for files in the current directory and launch the default browser:\n\n```\nsfs -b\n```\n\nSpecify a port:\n\n```\nsfs -p 777\n```\n\nAllow external connections:\n\n```\nsfs -l 0.0.0.0\n```\n\nServe files from another directory:\n\n```\nsfs -d ../bloop\n```\n\n## Advanced\n\n### HTTPS with SSL/TLS\n\nServe content via HTTPS with a self-signed TLS certificate:\n\n```\nsfs -s\n```\n\nThe TLS certificate is randomly generated at startup. Browsers will warn you about an insecure connection since the certificate is self-signed.\n\n### Digest Authentication\n\nEnable HTTP digest authentication with a username and password:\n\n```\nsfs -a gordon p4ssw0rd\n```\n\nUsername is optional. Password is required. If a username is not specified, any non-empty username will work. A password of `-` will prompt you for the password via stdin:\n\n```\nsfs -a -\n```\n\n### Proxying Requests\n\n`sfs` can act as an HTTP proxy. This is an altogether separate mode of operation from serving static files. This enables you to use `sfs` as a TLS-secured, digest-authenticated, logging frontend for another development server.\n\n```\nsfs -x localhost:4567\n```\n\n### Logging\n\nChange request logging format with `-f`:\n\n```bash\nsfs -f \"%i - [%t] %m %u %s %b - %a\"\n# 127.0.0.1 - [21/Jul/2016:21:07:51 -0500] GET / 200 273 - Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36\n```\n\nLog format:\n\n- `%i` Remote IP address\n- `%t` Request timestamp\n- `%m` Request HTTP method\n- `%u` Request URL\n- `%s` Response status code\n- `%b` Response length (bytes)\n- `%a` Request user agent (`User-Agent` HTTP header)\n\n### Caching\n\nBy default, `sfs` modifies incoming and outgoing cache headers (`Cache-Control`, `If-None-Match`, `If-Modified-Since`, `Last-Modified`, `ETag`) to ensure no caching occurs. To allow caching, this can be disabled with:\n\n```\nsfs -c\n```\n\n## License\n\nCopyright \u0026copy; 2016 Chris Schmich  \\\nMIT License. See [LICENSE](LICENSE) for details.\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschmich%2Fsfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschmich%2Fsfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschmich%2Fsfs/lists"}