Categorygithub.com/opendedup/sdfs-proxy
repository
0.0.0-20230103164043-26dc691bb94d
Repository: https://github.com/opendedup/sdfs-proxy.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

sdfs-proxy

SDFS Proxy is a proxy server that intercepts sdfs client api calls and proxies them to the backend SDFS volume. It provides Client Side Dedupe and access to most apis available on the server.

Example Usage

Connecting to a local volume listening on localhost

sdfs-proxy -listen-port localhost:16442

Connecting to a remote volume

sdfs-proxy -listen-port localhost:16442 -address sdfss://remoteserver:6442 -trust-all

Enabling Client Side Dedupe

sdfs-proxy -listen-port localhost:16442 -dedupe

Command Line Options

OptionDescriptionDefault value
-addressThe address for the Remote Volumesdfss://localhost:6442
-debugDebug to stdoutdisabled
-dedupeEnable Client Side Dedupedisabled
-listen-portThe Port to listen on for proxy requestslocalhost:16442
-local-authSets the local volume to authenticate to the given passwordadmin (disabled by default)
-mtlsUse Mutual TLSdisabled
-mtls-certThe path the client cert used for mutual TLS.$HOME/.sdfs/keys/client.crt
-mtls-keyThe path the private used for mutual TLS.$HOME/.sdfs/keys/client.key
-pThe Password to authenticate to the remote VolumePassword
-root-caThe path the CA cert used to sign the MTLS Cert.$HOME/.sdfs/keys/ca.crt
-trust-allTrust Self Signed TLS Certsdisabled
-trust-certTrust the certificate for url specified.$HOME/.sdfs/keys
-uThe Username to authenticate to the remote VolumeAdmin
-versionGet the version number

Building

git clone https://github.com/opendedup/sdfs-proxy.git
cd sdfs-proxy
make clean
make
cd build
./sdfs-proxy -h

Unsupported Operations

  1. Client to proxy TLS encryption
  2. Passthru authentication to the Target volume. the client only authenticates to the proxy itself. The proxy authenticates independenly to the remote SDFS volume.

Supported APIs

FileIOServiceClient

  • GetXAttrSize
  • Fsync
  • SetXAttr
  • RemoveXAttr
  • GetXAttr
  • Utime
  • Truncate
  • SymLink (linux only)
  • GetAttr
  • ReadLink
  • Flush
  • Chown
  • MkDir
  • RmDir
  • Unlink
  • Write - With deduplication writes will be cached locally and flushed to the target volume as buffer fills and on close.
  • Read
  • Release
  • Mknod
  • Open
  • GetFileInfo
  • CreateCopy
  • FileExists
  • MkDirAll
  • Stat
  • Rename
  • CopyExtent
  • SetUserMetaData
  • GetCloudFile
  • GetCloudMetaFile
  • StatFS

VolumeServiceClient

  • AuthenticateUser - The user is authenticated to the proxy by using the -local-auth switch
  • SetMaxAge
  • GetVolumeInfo
  • ShutdownVolume
  • CleanStore
  • DeleteCloudVolume
  • DSEInfo
  • SystemInfo
  • SetVolumeCapacity
  • GetConnectedVolumes
  • GetGCSchedule
  • SetCacheSize
  • SetReadSpeed
  • SetWriteSpeed
  • SyncFromCloudVolume
  • SyncCloudVolume

SDFSEventServiceClient

  • GetEvent
  • ListEvents
  • SubscribeEvent