Skip to content

Feature/run openvpn on mobile android - #534

Merged
tadovas merged 14 commits into
masterfrom
feature/run-openvpn-on-mobile-android
Nov 13, 2018
Merged

Feature/run openvpn on mobile android#534
tadovas merged 14 commits into
masterfrom
feature/run-openvpn-on-mobile-android

Conversation

@tadovas

@tadovas tadovas commented Nov 12, 2018

Copy link
Copy Markdown
Contributor

Description says it all.
Closes #364

@tadovas
tadovas force-pushed the feature/run-openvpn-on-mobile-android branch from 5e7fc02 to eb6536f Compare November 13, 2018 06:48
Comment thread mobile/mysterium/entrypoint.go Outdated
Comment thread services/openvpn/config_validator.go Outdated
var buff = &bytes.Buffer{}
fmt.Fprintln(buff, "-----BEGIN OpenVPN Static key V1-----")
left := key
for {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can't we do it like this?

for left := key; len(left) > 64; left = left[64:] {
   fmt.Fprintln(buff, left[0:64])
}
fmt.Fprintln(buff, left)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes we can. Also we can write additional test for this code part. Done

vkuznecovas
vkuznecovas previously approved these changes Nov 13, 2018

@soffokl soffokl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sorry, missed this on the first walkthrough.

Comment thread mobile/mysterium/entrypoint.go Outdated

// TODO Make Openvpn pluggable connection optional
Openvpn: noOpenvpnYet{},
Openvpn: embbededLibCheck{},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
Openvpn: embbededLibCheck{},
Openvpn: embeddedLibCheck{},

Comment thread mobile/mysterium/entrypoint.go Outdated
}

type noOpenvpnYet struct {
type embbededLibCheck struct {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
type embbededLibCheck struct {
type embeddedLibCheck struct {

Comment thread mobile/mysterium/entrypoint.go Outdated

func (noOpenvpnYet) Check() error {
// Check always returns nil as embedded lib does not have any external failing deps
func (embbededLibCheck) Check() error {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
func (embbededLibCheck) Check() error {
func (embeddedLibCheck) Check() error {

Comment thread mobile/mysterium/entrypoint.go Outdated
// BinaryPath returns noop binary path
func (noOpenvpnYet) BinaryPath() string {
return "no openvpn binary available on mobile"
func (embbededLibCheck) BinaryPath() string {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
func (embbededLibCheck) BinaryPath() string {
func (embeddedLibCheck) BinaryPath() string {

Comment thread mobile/mysterium/entrypoint.go Outdated

var _ node.Openvpn = noOpenvpnYet{}
// check if our struct satisfies Openvpn interface expected by node options
var _ node.Openvpn = embbededLibCheck{}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
var _ node.Openvpn = embbededLibCheck{}
var _ node.Openvpn = embeddedLibCheck{}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Renamed everywhere

Comment thread mobile/mysterium/entrypoint.go Outdated
type MobileNode struct {
di cmd.Dependencies
di cmd.Dependencies
identity identity.Identity

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

identity is unused now, is it for future usage?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nope. Leftover

@tadovas
tadovas merged commit 196a698 into master Nov 13, 2018
@tadovas
tadovas deleted the feature/run-openvpn-on-mobile-android branch November 13, 2018 09:53
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.

4 participants