remoton

Check-in [5c28df9e61]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:omit certificate when use -insecure
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256: 5c28df9e6192ee3972895398571f73f160e003416ae21bd933b1f8e6919dc229
User & Date: bit4bit@riseup.net 2016-08-04 15:07:22
Context
2016-08-04
15:07
xpra/xpra: --scaling parameter to --video-scaling check-in: 67eafaa272 user: bit4bit@riseup.net tags: master, trunk
15:07
omit certificate when use -insecure check-in: 5c28df9e61 user: bit4bit@riseup.net tags: master, trunk
14:11
cmd/remoton-client-desktop: add flag -insecure for skip validation tls check-in: 240166e12f user: bit4bit@riseup.net tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to cmd/remoton-client-desktop/main.go.

134
135
136
137
138
139
140



141
142
143
144
145
146
147
148
149

150
151
152
153
154
155
156

	btnSrv := gtk.NewButtonWithLabel("Start")
	clremoton.VNC.OnConnection(func(addr net.Addr) {
		statusbar.Push(contextID, "Someone connected")
		log.Println("New connection from:" + addr.String())
	})
	btnSrv.Clicked(func() {



		certPool, err := common.GetRootCAFromFile(getCertFilename())
		if err != nil {
			dialogError(window, err)
			return
		}
		clremoton.SetCertPool(certPool)
		if *insecure {
			clremoton.SetInsecure()
		}

		if !clremoton.Started() {
			log.Println("starting remoton")
			machinePassword = uuid.New()[:4]
			err := clremoton.Start(serverEntry.GetText(), authServerEntry.GetText(),
				machinePassword)

			if err != nil {







>
>
>
|
|
|
|
|
|
<
<

>







134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149


150
151
152
153
154
155
156
157
158

	btnSrv := gtk.NewButtonWithLabel("Start")
	clremoton.VNC.OnConnection(func(addr net.Addr) {
		statusbar.Push(contextID, "Someone connected")
		log.Println("New connection from:" + addr.String())
	})
	btnSrv.Clicked(func() {
		if *insecure {
			clremoton.SetInsecure()
		} else {
			certPool, err := common.GetRootCAFromFile(getCertFilename())
			if err != nil {
				dialogError(window, err)
				return
			}
			clremoton.SetCertPool(certPool)


		}

		if !clremoton.Started() {
			log.Println("starting remoton")
			machinePassword = uuid.New()[:4]
			err := clremoton.Start(serverEntry.GetText(), authServerEntry.GetText(),
				machinePassword)

			if err != nil {

Changes to cmd/remoton-support-desktop/client.go.

170
171
172
173
174
175
176
177

178
179
180
181
182
183
184

				break
			}
			log.Println("new connection")
			go c.handle(conn, remote)
		}
	}(listener)


	err = c.xpraSrv.Attach(addrSrv)
	if err != nil {
		listener.Close()
		return err
	}
	return nil
}







|
>







170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185

				break
			}
			log.Println("new connection")
			go c.handle(conn, remote)
		}
	}(listener)
	
	log.Println("Xpra " + c.xpraSrv.Version() + " attaching to " + addrSrv)
	err = c.xpraSrv.Attach(addrSrv)
	if err != nil {
		listener.Close()
		return err
	}
	return nil
}

Changes to cmd/remoton-support-desktop/main.go.

135
136
137
138
139
140
141



142
143
144
145
146
147
148
149
150
151

152
153
154
155
156
157
158
	controlBox.Add(serverEntry)

	btnCert := gtk.NewFileChooserButton("Cert", gtk.FILE_CHOOSER_ACTION_OPEN)
	controlBox.Add(btnCert)
	btn := gtk.NewButtonWithLabel("Connect")
	started := false
	btn.Clicked(func() {



		certPool, err := common.GetRootCAFromFile(btnCert.GetFilename())
		if err != nil {
			dialogError(window, err)
			return
		}

		rclient.TLSConfig.RootCAs = certPool
		if *insecure {
			rclient.TLSConfig.InsecureSkipVerify = true
		}

		session := &remoton.SessionClient{Client: rclient,
			ID:     machineIDEntry.GetText(),
			APIURL: "https://" + serverEntry.GetText()}

		if !started {
			err := chatSrv.Start(session)
			if err != nil {







>
>
>
|
|
|
|
|
<
|
<
<

>







135
136
137
138
139
140
141
142
143
144
145
146
147
148
149

150


151
152
153
154
155
156
157
158
159
	controlBox.Add(serverEntry)

	btnCert := gtk.NewFileChooserButton("Cert", gtk.FILE_CHOOSER_ACTION_OPEN)
	controlBox.Add(btnCert)
	btn := gtk.NewButtonWithLabel("Connect")
	started := false
	btn.Clicked(func() {
		if *insecure {
			rclient.TLSConfig.InsecureSkipVerify = true
		} else {
			certPool, err := common.GetRootCAFromFile(btnCert.GetFilename())
			if err != nil {
				dialogError(window, err)
				return
			}

			rclient.TLSConfig.RootCAs = certPool


		}

		session := &remoton.SessionClient{Client: rclient,
			ID:     machineIDEntry.GetText(),
			APIURL: "https://" + serverEntry.GetText()}

		if !started {
			err := chatSrv.Start(session)
			if err != nil {