An electronic device comprising: a housing; at least one antenna; at least one wireless communication circuitry located in the housing, operatively connected to the antenna, and configured to support a neighbor awareness networking, NAN, protocol; a processor located in the housing and operatively connected to the wireless communication circuitry; and a memory operatively connected to the processor, wherein the memory stores instructions that, when being executed, cause the processor to: broadcast a first signal notifying that the electronic device can operate as a first proxy server through the wireless communication circuitry, receive a second signal including a first proxy client registration request from a first external electronic device (520, 620), transmit a third signal including a first proxy client registration response to the first external electronic device in response to the second signal, receive a fourth signal notifying that a second external electronic device (530, 630) can operate as a second proxy server from the second external electronic device through the wireless communication circuitry while operating as the first proxy server of the first external electronic device, transmit a fifth signal including a second proxy client registration request to the second external electronic device based on the fourth signal, receive a sixth signal including a second proxy client registration response corresponding to the fifth signal from the second external electronic device, and operate the electronic device as a first proxy client of the second external electronic device in parallel with operating the electronic device as the first proxy server of the first external electronic device. a housing; at least one antenna; at least one wireless communication circuitry located in the housing, operatively connected to the antenna, and configured to support a neighbor awareness networking, NAN, protocol; a processor located in the housing and operatively connected to the wireless communication circuitry; and a memory operatively connected to the processor, wherein the memory stores instructions that, when being executed, cause the processor to: broadcast a first signal notifying that the electronic device can operate as a first proxy server through the wireless communication circuitry, receive a second signal including a first proxy client registration request from a first external electronic device (520, 620), transmit a third signal including a first proxy client registration response to the first external electronic device in response to the second signal, receive a fourth signal notifying that a second external electronic device (530, 630) can operate as a second proxy server from the second external electronic device through the wireless communication circuitry while operating as the first proxy server of the first external electronic device, transmit a fifth signal including a second proxy client registration request to the second external electronic device based on the fourth signal, receive a sixth signal including a second proxy client registration response corresponding to the fifth signal from the second external electronic device, and operate the electronic device as a first proxy client of the second external electronic device in parallel with operating the electronic device as the first proxy server of the first external electronic device. broadcast a first signal notifying that the electronic device can operate as a first proxy server through the wireless communication circuitry, receive a second signal including a first proxy client registration request from a first external electronic device (520, 620), transmit a third signal including a first proxy client registration response to the first external electronic device in response to the second signal, receive a fourth signal notifying that a second external electronic device (530, 630) can operate as a second proxy server from the second external electronic device through the wireless communication circuitry while operating as the first proxy server of the first external electronic device, transmit a fifth signal including a second proxy client registration request to the second external electronic device based on the fourth signal, receive a sixth signal including a second proxy client registration response corresponding to the fifth signal from the second external electronic device, and operate the electronic device as a first proxy client of the second external electronic device in parallel with operating the electronic device as the first proxy server of the first external electronic device.