Versions in this module Expand all Collapse all v2 v2.0.0 Apr 14, 2026 Changes in this version + func GenerateQRCode(uri string) string + func GenerateToken() string + func GetClientIP(r *http.Request, whitelist *Whitelist) string + type BreadcrumbPart struct + Name string + Path string + type ClipEntry struct + Content string + ID int + Time string + type CustomMux struct + func NewCustomMux() *CustomMux + func (cm *CustomMux) Handle(pattern string, handler http.Handler) + func (cm *CustomMux) HandleFunc(pattern string, handler http.HandlerFunc) + func (cm *CustomMux) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (cm *CustomMux) Use(mw Middleware) + type DownloadEntry struct + DownloadURL string + QRCode template.URL + type FileItem struct + Auth bool + Extension string + IsDir bool + LastMod string + LastModRaw int64 + Name string + QRCode string + RelPath string + Size string + SizeRaw int64 + type FileServer struct + CACert string + CLI bool + CSRFToken string + Clipboard *clipboard.Clipboard + DropUser string + Embedded bool + Fingerprint1 string + Fingerprint256 string + Hub *ws.Hub + IP string + Invisible bool + LetsEncrypt bool + MyCert string + MyKey string + MyP12 string + NoClipboard bool + NoDelete bool + Options *options.Options + P12NoPass bool + Pass string + Port int + ReadOnly bool + SSL bool + SelfSigned bool + SharedLinks map[string]SharedLink + Silent bool + Tunnel bool + TunnelURL string + UploadFolder string + UploadOnly bool + User string + Verbose bool + Version string + WebdavPort int + Webhook webhook.Webhook + Webroot string + Whitelist *Whitelist + func NewHttpServer(opts *options.Options, hub *ws.Hub, clip *clipboard.Clipboard, wl *Whitelist, ...) *FileServer + func (files *FileServer) AddCertAuth(server *http.Server) + func (files *FileServer) PrintEmbeddedFiles() + func (fs *FileServer) BasicAuthMiddleware(next http.Handler) http.Handler + func (fs *FileServer) CreateShareHandler(w http.ResponseWriter, r *http.Request) + func (fs *FileServer) DeleteShareHandler(w http.ResponseWriter, r *http.Request) + func (fs *FileServer) IPWhitelistMiddleware(next http.Handler) http.Handler + func (fs *FileServer) InvisibleBasicAuthMiddleware(next http.Handler) http.Handler + func (fs *FileServer) ServerHeaderMiddleware(next http.Handler) http.Handler + func (fs *FileServer) SetupMux(mux *CustomMux, what string) string + func (fs *FileServer) ShareHandler(w http.ResponseWriter, r *http.Request) + func (fs *FileServer) Start(what string) + func (fs *FileServer) StartListener(server *http.Server, what string, listener net.Listener) + type Middleware func(http.Handler) http.Handler + type SharedLink struct + DownloadEntries []DownloadEntry + DownloadLimit int + Downloaded int + Expires time.Time + FilePath string + IsDir bool + type UIData struct + AbsPath string + BreadcrumbParts []BreadcrumbPart + CLI bool + CSRFToken string + Clipboard []ClipEntry + Embedded bool + EmbeddedItems []FileItem + GoshsVersion string + Items []FileItem + NoClipboard bool + NoDelete bool + QRCode string + ReadOnly bool + SharedLinks map[string]SharedLink + Subdirectory bool + UploadOnly bool + type Whitelist struct + Enabled bool + Networks []*net.IPNet + TrustedProxies []*net.IPNet + func NewIPWhitelist(cidrs string, enabled bool, trustedProxies string) (*Whitelist, error) + func (w *Whitelist) IsAllowed(ipStr string) bool + func (w *Whitelist) IsTrustedProxy(ipStr string) bool Other modules containing this package github.com/patrickhener/goshs