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

domru: tls: either ServerName or InsecureSkipVerify must be specified in the tls.Config #731

Closed
twocolors opened this issue Nov 6, 2023 · 9 comments
Labels
bug Something isn't working
Milestone

Comments

@twocolors
Copy link

Get "https://cctv-sa1-dmfn.vs.ru:18080/rtsp/8409150469/FSjF4sggtw6pBlbz6Otn": tls: either ServerName or InsecureSkipVerify must be specified in the tls.Config
@AlexxIT AlexxIT added the bug Something isn't working label Nov 6, 2023
@AlexxIT
Copy link
Owner

AlexxIT commented Nov 6, 2023

Fixed in latest master version

@AlexxIT AlexxIT added this to the v1.8.3 milestone Nov 15, 2023
@twocolors twocolors reopened this Nov 15, 2023
@twocolors
Copy link
Author

twocolors commented Nov 15, 2023

go2rtc  | 16:29:34.005 INF go2rtc version 1.8.3 linux/amd64
go2rtc  | 16:29:34.005 INF [rtsp] listen addr=:8554
go2rtc  | 16:29:34.005 INF [api] listen addr=:1984
go2rtc  | 16:29:34.005 INF [webrtc] listen addr=:8555
go2rtc exited with code 2
go2rtc  | panic: interface conversion: interface {} is nil, not *tls.Config
go2rtc  |
go2rtc  | goroutine 57 [running]:
go2rtc  | github.com/AlexxIT/go2rtc/pkg/tcp.Do.func2({0xd2cf08, 0xc000164000}, {0xc11ec2?, 0xd2c958?}, {0xc0003b6090?, 0xb421a0?})
go2rtc  |       github.com/AlexxIT/go2rtc/pkg/tcp/request.go:51 +0x1e5
go2rtc  | net/http.(*Transport).customDialTLS(0x0?, {0xd2cf08?, 0xc000164000?}, {0xc11ec2?, 0x8b9940?}, {0xc0003b6090?, 0xd38148?})
go2rtc  |       net/http/transport.go:1335 +0x4a
go2rtc  | net/http.(*Transport).dialConn(0xc0002d0000, {0xd2cf08, 0xc000164000}, {{}, 0x0, {0xc000042120, 0x5}, {0xc0003b6090, 0x28}, 0x0})
go2rtc  |       net/http/transport.go:1601 +0x3df
go2rtc  | net/http.(*Transport).dialConnFor(0x0?, 0xc0000cc000)
go2rtc  |       net/http/transport.go:1467 +0x9f
go2rtc  | created by net/http.(*Transport).queueForDial in goroutine 40
go2rtc  |       net/http/transport.go:1436 +0x3cb
go2rtc  | 16:30:39.820 INF go2rtc version 1.8.3 linux/amd64
go2rtc  | 16:30:39.820 INF [rtsp] listen addr=:8554
go2rtc  | 16:30:39.820 INF [api] listen addr=:1984
go2rtc  | 16:30:39.821 INF [webrtc] listen addr=:8555

@AlexxIT
Copy link
Owner

AlexxIT commented Nov 15, 2023

You can try to use expr source. It works in current release:
https://github.com/AlexxIT/go2rtc/blob/master/internal/expr

@twocolors
Copy link
Author

if use "expr" , all work and i see stream in web

but not work on HomeKit

p.s. add support env for "expr"

@AlexxIT
Copy link
Owner

AlexxIT commented Nov 15, 2023

Show expr example, how do you want to use env

PS. Problem not fixed yet in latest master version

@twocolors
Copy link
Author

In docker

  go2rtc:
    container_name: "go2rtc"
    hostname: "go2rtc"
    image: "alexxit/go2rtc:latest"
    #image: "alexxit/go2rtc:master-hardware"
    privileged: true
    environment:
      - TZ=Europe/Moscow
      - TOKEN=1111111111111111
      - OPERATOR=42
    volumes:
      - "/home/dietpi/.go2rtc:/config"
    restart: unless-stopped
    network_mode: host

in config

streams:
  intercom_child: |
    expr:
    let camera = "123";
    fetch("https://myhome.novotelecom.ru/rest/v1/forpost/cameras/"+camera+"/video", {
      headers: {Authorization: env('TOKEN'), Operator: env('OPERATOR')}
    }).json().data.URL
  intercom_homeowner: |
    expr:
    let camera = "321";
    fetch("https://myhome.novotelecom.ru/rest/v1/forpost/cameras/"+camera+"/video", {
      headers: {Authorization: env('TOKEN'), Operator: env('OPERATOR')}
    }).json().data.URL

@AlexxIT
Copy link
Owner

AlexxIT commented Nov 15, 2023

Try to use environment for yaml config. They should be rendered before the expr code.
https://github.com/AlexxIT/go2rtc/wiki/Configuration

PS. Don't forget the quotes

@twocolors
Copy link
Author

Try to use environment for yaml config. They should be rendered before the expr code. https://github.com/AlexxIT/go2rtc/wiki/Configuration

PS. Don't forget the quotes

thx, work

@AlexxIT AlexxIT modified the milestones: v1.8.3, v1.8.4 Nov 18, 2023
@AlexxIT
Copy link
Owner

AlexxIT commented Nov 19, 2023

@AlexxIT AlexxIT closed this as completed Nov 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants