webtunnel.go 691 B

1234567891011121314151617181920212223242526272829303132333435
  1. package webtunnel
  2. import (
  3. "errors"
  4. pt "gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/goptlib"
  5. "gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/transports/base"
  6. )
  7. const (
  8. ptName = "webtunnel"
  9. )
  10. var (
  11. unimplementedFeature = errors.New("unimplemented")
  12. )
  13. type transport struct {
  14. }
  15. func (t *transport) Name() string {
  16. return ptName
  17. }
  18. func (t *transport) ClientFactory(stateDir string) (base.ClientFactory, error) {
  19. return &clientFactory{parent: t}, nil
  20. }
  21. func (t *transport) ServerFactory(stateDir string, args *pt.Args) (base.ServerFactory, error) {
  22. return nil, unimplementedFeature
  23. }
  24. var Transport base.Transport = (*transport)(nil)