Giter Club home page Giter Club logo

mdns's People

Contributors

at-wat avatar bendahl avatar edaniels avatar hugoarregui avatar jonasberge avatar jpeletier avatar la3lma avatar nullvariable avatar pionbot avatar renovate-bot avatar renovate[bot] avatar sean-der avatar simonverkada avatar stv0g avatar sukunrt avatar trivigy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

mdns's Issues

How can I connect to an app in another port?

I'm not much into mDNS, but I need to broadcast my IP to the local network, so Chrome can connect to my server in port 8080, but i'm not able to connect to it through "my-mdns.local:8080" and I can't set a default port to broadcast (if it makes sense).

What can I do? Is this a feature to be implemented?

Does not work on Windows

What happened?

I am using Windows (11) and running the example programs does not work. I start the server and run dns-sd -q my-domain.local from another computer (macOS) and expect to receive a response from the Windows machine running the pion mDNS server. But I don't get anything. I see the mDNS packets coming through in Wireshark but the Go program does not seem to get them and therefore does not respond.

Error "mDNS: failed to join multicast group" on WSL in Windows

errJoiningMulticastGroup = errors.New("mDNS: failed to join multicast group")

mdns/conn.go

Line 66 in b37c5ea

return nil, errJoiningMulticastGroup

I am seeing this log message from the code fragment

import ( "github.com/pion/webrtc/v2" )
func doWebRTC() {
    _, err := webrtc.NewPeerConnection(webrtc.Configuration{})
    if err != nil {
        log.Println("error while starting RTC server:", err)
    }
}
go doWebRTC()

I am not sure what is causing it but I have seen it referenced in at least one other issue: pion/example-webrtc-applications#27

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

Querying does not work for cases when advertising is delegated to another host.

Your environment.

  • Version: v0.0.5
  • Browser: N/A
  • Other Information - N/A

What did you do?

I have a code that advertises A records on behalf of other hosts. Simple code to do that is (this code runs on a host with a different IP address):

package main

import (
	"github.com/davecheney/mdns"
	"fmt"
	"time"
)

func main() {
	err := mdns.Publish("test.local 60 IN A 10.0.1.0")
	if err != nil {
		panic(err)
	}
	fmt.Println("ok")
	time.Sleep(60 * time.Minute)
}

Then query it using code as in examples:

package main

import (
	"context"
	"fmt"
	"net"

	"github.com/pion/mdns"
	"golang.org/x/net/ipv4"
)

func main() {
	addr, err := net.ResolveUDPAddr("udp", mdns.DefaultAddress)
	if err != nil {
		panic(err)
	}

	l, err := net.ListenUDP("udp4", addr)
	if err != nil {
		panic(err)
	}

	server, err := mdns.Server(ipv4.NewPacketConn(l), &mdns.Config{})
	if err != nil {
		panic(err)
	}
	answer, src, err := server.Query(context.TODO(), "test.local")
	if err != nil {
		panic(err)
	}
	fmt.Println(answer)
	fmt.Println(src)
	fmt.Println(err)
}

What did you expect?

Querying using this library should work. It works using avahi client and it works using macos dns-sd. I expect that while the above code is running, querying using this library for "test.local" returns correct result.

What happened?

It hangs indefinitely.

Unanswered queries are not cleaned up

Your environment.

  • Version: v0.0.9
  • Browser: --
  • Other Information - Conn.Query(...) should cleanup it's entry in c.queries when it returns. Otherwise, unanswered queries will remain in the slice, causing a memory leak.

What did you do?

Created mDNS server. Ran query for address which is not being advertised (at the moment the query is placed) with a 10 second timeout. Some time later, make another query. Rinse and repeat forever.

Server:

	destination := "my-destination"

	mdnsServer, err = mdns.Server(ipv4.NewPacketConn(l), &mdns.Config{
		LocalNames:   localNames,
		LocalAddress: localIP,
	})
	if err != nil {
		panic(err)
	}
 
	queryCtx, queryCancel := context.WithTimeout(context.Background(), 5*time.Second)
	defer queryCancel()
	answer, src, err := mdnsServer.Query(queryCtx, destination)
	if err != nil {
		panic(err)
	}
	// Use answer, src

What did you expect?

Expected the query to be cleared after the timeout expires.

What happened?

The queries map grows forever with unanswered queries, which hold a reference to a heap allocated channel. Since these are never cleared (until the server is stopped), this causes a memory leak in long-standing servers which make unanswered queries.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.