Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: skip HTTP auth when connected via USB #104

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mpldr
Copy link
Contributor

@mpldr mpldr commented Jan 13, 2024

When connected via USB it doesn't make a whole lot of sense to ask for a password.

@owulveryck
Copy link
Owner

Nice!

@owulveryck
Copy link
Owner

I had a deeper though about it.

I think we can leave it as a choice to the user.
People connecting only via USB should be able to combine the BIND_ADDRESS and the -unsafe option.

It is useful to people using both, and to be honest, the browser are querying only once.

What is the use case you are fulfilling with this feature?

@mpldr
Copy link
Contributor Author

mpldr commented Jan 15, 2024

It's useful when starting the server once and then "forgetting" about it. My employers network does not allow for LAN (PC) to WIFI (remarkable) access, while most other networks do. Thus I am required to connect via USB. When connecting via WIFI however I want the authentication to be required.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GoGitOps Review

Grade: A+ (98.9%)

Files: 31

Issues: 2

gofmt: 100%

go_vet: 100%

gocyclo: 96%

internal/eventhttphandler/gesture_handler.go
	Line 57: warning: cyclomatic complexity 16 of function (*GestureHandler).ServeHTTP() is high (> 15) (gocyclo)

golint: 93%

internal/eventhttphandler/gesture_handler.go
	Line 14: warning: exported type SwipeDirection should have comment or be unexported (golint)
internal/eventhttphandler/gesture_handler.go
	Line 17: warning: exported const SwipeLeft should have comment (or a comment on this block) or be unexported (golint)
internal/remarkable/ip.go
	Line 10: warning: exported function HostsIP should have comment or be unexported (golint)

license: 100%

ineffassign: 100%

misspell: 100%

This report was generated using GoGitOps.

"strings"
)

func HostsIP(addr string) bool {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: exported function HostsIP should have comment or be unexported (golint)

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GoGitOps Review

Grade: A+ (98.9%)

Files: 31

Issues: 2

gofmt: 100%

go_vet: 100%

gocyclo: 96%

internal/eventhttphandler/gesture_handler.go
	Line 57: warning: cyclomatic complexity 16 of function (*GestureHandler).ServeHTTP() is high (> 15) (gocyclo)

golint: 93%

internal/eventhttphandler/gesture_handler.go
	Line 14: warning: exported type SwipeDirection should have comment or be unexported (golint)
internal/eventhttphandler/gesture_handler.go
	Line 17: warning: exported const SwipeLeft should have comment (or a comment on this block) or be unexported (golint)
internal/remarkable/ip.go
	Line 10: warning: exported function HostsIP should have comment or be unexported (golint)

license: 100%

ineffassign: 100%

misspell: 100%

This report was generated using GoGitOps.

"strings"
)

func HostsIP(addr string) bool {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: exported function HostsIP should have comment or be unexported (golint)

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GoGitOps Review

Grade: A+ (98.9%)

Files: 31

Issues: 2

gofmt: 100%

go_vet: 100%

gocyclo: 96%

internal/eventhttphandler/gesture_handler.go
	Line 57: warning: cyclomatic complexity 16 of function (*GestureHandler).ServeHTTP() is high (> 15) (gocyclo)

golint: 93%

internal/eventhttphandler/gesture_handler.go
	Line 14: warning: exported type SwipeDirection should have comment or be unexported (golint)
internal/eventhttphandler/gesture_handler.go
	Line 17: warning: exported const SwipeLeft should have comment (or a comment on this block) or be unexported (golint)
internal/remarkable/ip.go
	Line 10: warning: exported function HostsIP should have comment or be unexported (golint)

license: 100%

ineffassign: 100%

misspell: 100%

This report was generated using GoGitOps.

"strings"
)

func HostsIP(addr string) bool {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: exported function HostsIP should have comment or be unexported (golint)

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GoGitOps Review

Grade: A+ (98.9%)

Files: 31

Issues: 2

gofmt: 100%

go_vet: 100%

gocyclo: 96%

internal/eventhttphandler/gesture_handler.go
	Line 57: warning: cyclomatic complexity 16 of function (*GestureHandler).ServeHTTP() is high (> 15) (gocyclo)

golint: 93%

internal/eventhttphandler/gesture_handler.go
	Line 14: warning: exported type SwipeDirection should have comment or be unexported (golint)
internal/eventhttphandler/gesture_handler.go
	Line 17: warning: exported const SwipeLeft should have comment (or a comment on this block) or be unexported (golint)
internal/remarkable/ip.go
	Line 10: warning: exported function HostsIP should have comment or be unexported (golint)

license: 100%

ineffassign: 100%

misspell: 100%

This report was generated using GoGitOps.

"strings"
)

func HostsIP(addr string) bool {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: exported function HostsIP should have comment or be unexported (golint)

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GoGitOps Review

Grade: A+ (98.9%)

Files: 31

Issues: 2

gofmt: 100%

go_vet: 100%

gocyclo: 96%

internal/eventhttphandler/gesture_handler.go
	Line 57: warning: cyclomatic complexity 16 of function (*GestureHandler).ServeHTTP() is high (> 15) (gocyclo)

golint: 93%

internal/eventhttphandler/gesture_handler.go
	Line 14: warning: exported type SwipeDirection should have comment or be unexported (golint)
internal/eventhttphandler/gesture_handler.go
	Line 17: warning: exported const SwipeLeft should have comment (or a comment on this block) or be unexported (golint)
internal/remarkable/ip.go
	Line 10: warning: exported function HostsIP should have comment or be unexported (golint)

license: 100%

ineffassign: 100%

misspell: 100%

This report was generated using GoGitOps.

"strings"
)

func HostsIP(addr string) bool {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: exported function HostsIP should have comment or be unexported (golint)

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GoGitOps Review

Grade: A+ (98.9%)

Files: 31

Issues: 2

gofmt: 100%

go_vet: 100%

gocyclo: 96%

internal/eventhttphandler/gesture_handler.go
	Line 57: warning: cyclomatic complexity 16 of function (*GestureHandler).ServeHTTP() is high (> 15) (gocyclo)

golint: 93%

internal/eventhttphandler/gesture_handler.go
	Line 14: warning: exported type SwipeDirection should have comment or be unexported (golint)
internal/eventhttphandler/gesture_handler.go
	Line 17: warning: exported const SwipeLeft should have comment (or a comment on this block) or be unexported (golint)
internal/remarkable/ip.go
	Line 10: warning: exported function HostsIP should have comment or be unexported (golint)

license: 100%

ineffassign: 100%

misspell: 100%

This report was generated using GoGitOps.

"strings"
)

func HostsIP(addr string) bool {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: exported function HostsIP should have comment or be unexported (golint)

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GoGitOps Review

Grade: A+ (98.9%)

Files: 31

Issues: 2

gofmt: 100%

go_vet: 100%

gocyclo: 96%

internal/eventhttphandler/gesture_handler.go
	Line 57: warning: cyclomatic complexity 16 of function (*GestureHandler).ServeHTTP() is high (> 15) (gocyclo)

golint: 93%

internal/eventhttphandler/gesture_handler.go
	Line 14: warning: exported type SwipeDirection should have comment or be unexported (golint)
internal/eventhttphandler/gesture_handler.go
	Line 17: warning: exported const SwipeLeft should have comment (or a comment on this block) or be unexported (golint)
internal/remarkable/ip.go
	Line 10: warning: exported function HostsIP should have comment or be unexported (golint)

license: 100%

ineffassign: 100%

misspell: 100%

This report was generated using GoGitOps.

"strings"
)

func HostsIP(addr string) bool {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: exported function HostsIP should have comment or be unexported (golint)

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GoGitOps Review

Grade: A+ (98.9%)

Files: 31

Issues: 2

gofmt: 100%

go_vet: 100%

gocyclo: 96%

internal/eventhttphandler/gesture_handler.go
	Line 57: warning: cyclomatic complexity 16 of function (*GestureHandler).ServeHTTP() is high (> 15) (gocyclo)

golint: 93%

internal/eventhttphandler/gesture_handler.go
	Line 14: warning: exported type SwipeDirection should have comment or be unexported (golint)
internal/eventhttphandler/gesture_handler.go
	Line 17: warning: exported const SwipeLeft should have comment (or a comment on this block) or be unexported (golint)
internal/remarkable/ip.go
	Line 10: warning: exported function HostsIP should have comment or be unexported (golint)

license: 100%

ineffassign: 100%

misspell: 100%

This report was generated using GoGitOps.

"strings"
)

func HostsIP(addr string) bool {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: exported function HostsIP should have comment or be unexported (golint)

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GoGitOps Review

Grade: A+ (98.9%)

Files: 31

Issues: 2

gofmt: 100%

go_vet: 100%

golint: 93%

internal/eventhttphandler/gesture_handler.go
	Line 14: warning: exported type SwipeDirection should have comment or be unexported (golint)
internal/eventhttphandler/gesture_handler.go
	Line 17: warning: exported const SwipeLeft should have comment (or a comment on this block) or be unexported (golint)
internal/remarkable/ip.go
	Line 10: warning: exported function HostsIP should have comment or be unexported (golint)

gocyclo: 96%

internal/eventhttphandler/gesture_handler.go
	Line 57: warning: cyclomatic complexity 16 of function (*GestureHandler).ServeHTTP() is high (> 15) (gocyclo)

ineffassign: 100%

license: 100%

misspell: 100%

This report was generated using GoGitOps.

"strings"
)

func HostsIP(addr string) bool {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: exported function HostsIP should have comment or be unexported (golint)

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GoGitOps Review

Grade: A+ (98.9%)

Files: 31

Issues: 2

gofmt: 100%

go_vet: 100%

gocyclo: 96%

internal/eventhttphandler/gesture_handler.go
	Line 57: warning: cyclomatic complexity 16 of function (*GestureHandler).ServeHTTP() is high (> 15) (gocyclo)

golint: 93%

internal/remarkable/ip.go
	Line 10: warning: exported function HostsIP should have comment or be unexported (golint)
internal/eventhttphandler/gesture_handler.go
	Line 14: warning: exported type SwipeDirection should have comment or be unexported (golint)
internal/eventhttphandler/gesture_handler.go
	Line 17: warning: exported const SwipeLeft should have comment (or a comment on this block) or be unexported (golint)

license: 100%

ineffassign: 100%

misspell: 100%

This report was generated using GoGitOps.

"strings"
)

func HostsIP(addr string) bool {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: exported function HostsIP should have comment or be unexported (golint)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants